// JavaScript Document
//浮动信息窗口
document.write("<DIV id='divReview' style='background:#fdf7f7; border:1px solid #b26287; LEFT:344px; VISIBILITY: hidden; POSITION:absolute; TOP:210px; padding:2px; z-index:2;'></DIV>");
//浮动信息窗口相关函数
function Face_MouseOver(evt,imgstr)
{ 
var mouseX, mouseY; 
var addY = -10;
var evt = window.event?window.event:evt;
var scrollHeight = getScrollHeight();
var scrollWidth = getScrollWidth();
mouseX = evt.clientX;
mouseY = evt.clientY; 

document.getElementById("divReview").innerHTML = '<img src=' + imgstr + ' >'; 

	var popLeftAdjust = 0;
	var popTopAdjust = 0;
	var popWidth = document.getElementById("divReview").clientWidth;
	var popHeight = document.getElementById("divReview").clientHeight;
	var clientWidth = document.body.clientWidth || document.documentElement.clientWidth;
	var clientHeight = document.body.clientHeight || document.documentElement.clientHeight;
	if (mouseX + 20 + popWidth > clientWidth) {
		popLeftAdjust = - popWidth - 33;
	}
	if (mouseY + 5 + popHeight > clientHeight) {
		popTopAdjust = - popHeight;
	}
document.getElementById("divReview").style.top  = mouseY + 5 + scrollHeight + popTopAdjust+ addY + "px";
document.getElementById("divReview").style.left =  mouseX + 20 + scrollWidth + popLeftAdjust + "px";
document.getElementById("divReview").style.visibility = "visible";
 
}
//隐藏窗口
function Face_MouseOut()
{
    document.getElementById("divReview").style.visibility = "hidden";
}
//获取滚动条
function getScrollHeight(){
var scrollPos; 
if (typeof window.pageYOffset != 'undefined') { 
scrollPos = window.pageYOffset; 
} 
else if (typeof document.compatMode != 'undefined' && 
document.compatMode != 'BackCompat') { 
scrollPos = document.documentElement.scrollTop; 
} 
else if (typeof document.body != 'undefined') { 
scrollPos = document.body.scrollTop; 
} 
return scrollPos;
}
function getScrollWidth()
{
	var scrollPos; 
	if (typeof window.pageXOffset != 'undefined') { 
	scrollPos = window.pageXOffset; 
	} 
	else if (typeof document.compatMode != 'undefined' && 
	document.compatMode != 'BackCompat') { 
	scrollPos = document.documentElement.scrollLeft; 
	} 
	else if (typeof document.body != 'undefined') { 
	scrollPos = document.body.scrollLeft; 
	} 
	return scrollPos;
}

function nowTitle(bg1,bg2,bg3)
{
	if (bg1=='right_title')
	{
		document.getElementById(bg1).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab1.gif)";
		document.getElementById(bg2).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
		document.getElementById(bg3).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
	    document.getElementById("top_right").className="middle01";
		document.getElementById("top_error").className="middle02";
		document.getElementById("top_acc").className="middle02";
	    document.getElementById("font_col1").style.color="#b26287";
		document.getElementById("font_col2").style.color="#ffffff";
		document.getElementById("font_col3").style.color="#ffffff";
	}
	else if (bg1=='error_title')
	{
		document.getElementById(bg1).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab1.gif)";
		document.getElementById(bg2).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
		document.getElementById(bg3).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
	    document.getElementById("top_right").className="middle02";
		document.getElementById("top_error").className="middle01";
		document.getElementById("top_acc").className="middle02";
		document.getElementById("font_col1").style.color="#ffffff";
		document.getElementById("font_col2").style.color="#b26287";
		document.getElementById("font_col3").style.color="#ffffff";
	}
	else if (bg1=='acc_title')
	{
		document.getElementById(bg1).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab1.gif)";
		document.getElementById(bg2).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
		document.getElementById(bg3).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
	    document.getElementById("top_right").className="middle02";
		document.getElementById("top_error").className="middle02";
		document.getElementById("top_acc").className="middle01";
		document.getElementById("font_col1").style.color="#ffffff";
		document.getElementById("font_col2").style.color="#ffffff";
		document.getElementById("font_col3").style.color="#b26287";
	}
}
/*上传照片教程*/
function stepIn(sid,imgid)
{
	document.getElementById(sid).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab1.gif)";
	document.getElementById(sid).style.color="#b26287";
	document.getElementById(imgid).style.display="block";
}
function stepOut(sid,imgid)
{
	document.getElementById(sid).style.backgroundImage="url(http://p.image.91.com/pic/images/photo_titletab2.gif)";
	document.getElementById(sid).style.color="#ffffff";
	document.getElementById(imgid).style.display="none";
}
function stepChange(sid1,sid2,sid3,sid4,sid5,imgid1,imgid2,imgid3,imgid4,imgid5)
{
	stepIn(sid1,imgid1);
	stepOut(sid2,imgid2);
	stepOut(sid3,imgid3);
	stepOut(sid4,imgid4);
	stepOut(sid5,imgid5);
}
