var isIe=(document.all)?true:false;

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//DataLength
function b_strlen(fData)
{
	var intLength=0;
	for (var i=0;i<fData.length;i++)
	{
		if ((fData.charCodeAt(i) < 0) || (fData.charCodeAt(i) > 255))
			intLength=intLength+2;
		else
			intLength=intLength+1;   
	}
	return intLength;
}

//英文总数
function b_enstrlen(fData)
{
	var intLength=0;
	for (var i=0;i<fData.length;i++)
	{
		if ((fData.charCodeAt(i) < 0) || (fData.charCodeAt(i) > 255))
			intLength=intLength+1;   
	}
	return intLength;
}

//中文总数
function b_cnstrlen(fData)
{
	var intLength=0;
	for (var i=0;i<fData.length;i++)
	{
		if ((fData.charCodeAt(i) < 0) || (fData.charCodeAt(i) > 255))
		{
			
		}
		else
		{
			intLength=intLength+1;
		}
	}
	return intLength;
}


//检测Email是否合法
function isEmail(email)
{
	email = cTrim(email, 0);
	if (email=="" )
	return false;

	invalidChars = " /:"
	if (email == "") {
		return (false);
	}
	for (i=0; i < invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) != -1) {
			return (false);
		}
	}

	atPos = email.indexOf("@", 1)
	if (atPos == -1) {
		return (false);
	}

	//if (email.indexOf("@", atPos + 1) != -1) {
	//	return (false);
	//}

	periodPos = email.indexOf(".", atPos)
	if (periodPos == -1) {
		return (false);
	}
	if (periodPos + 3 > email.length) {
		return (false);
	}

	return (true);
}

//****************************************************************
// Code by Yahao
// Copyright by YAHAO Studio & 清水万维工作室 
// Date: 2000-6-14
// Description: sInputString 为输入字符串，iType为类型，分别为
// 0 - 去除前后空格; 1 - 去前导空格; 2 - 去尾部空格
//****************************************************************
function cTrim(sInputString,iType)
{
	var sTmpStr = ' '
	var i = -1

	if(iType == 0 || iType == 1)
	{
		while(sTmpStr == ' ')
		{
			++i
			sTmpStr = sInputString.substr(i,1)
		}
		sInputString = sInputString.substring(i)
	}

	if(iType == 0 || iType == 2)
	{
		sTmpStr = ' '
		i = sInputString.length
		while(sTmpStr == ' ')
		{
			--i
			sTmpStr = sInputString.substr(i,1)
		}
		sInputString = sInputString.substring(0,i+1)
	}
	return sInputString;
}

//公用保存
function Save_Check()
{
	if(document.getElementById('but_make'))
	{
		document.getElementById('but_make').disabled=true;
	}
	if(document.getElementById('but_make2'))
	{
		document.getElementById('but_make2').disabled=true;
	}
	if(document.getElementById('but_make3'))
	{
		document.getElementById('but_make3').disabled=true;
	}
	document.getElementById('_savedata').submit();
	return ;
}

//公用保存
function Save_Check2()
{
	if(document.getElementById('but_make'))
	{
		document.getElementById('but_make').disabled=true;
	}
	if(document.getElementById('but_make2'))
	{
		document.getElementById('but_make2').disabled=true;
	}
	if(document.getElementById('but_make3'))
	{
		document.getElementById('but_make3').disabled=true;
	}
	document.getElementById('_savedata2').submit();
	return ;
}

function Close_InfoBox(obj)
{
	$('#'+obj).fadeOut(1000);
	$('#'+obj).hide('slow');
}

function Hide_WinBox(obj, inttime, intnum)
{
	if(isIE)
	{
		intnum = intnum+1;
		if(intnum > 20)
		{
			document.getElementById("p"+obj).style.display = "none";
		}
		else
		{
			document.getElementById(obj).filters.Alpha.Opacity += -5;
			window.setTimeout("Hide_WinBox('"+obj+"',"+inttime+","+intnum+")", inttime);
		}
	}
	else
	{
		document.getElementById("p"+obj).style.display = "none";
	}
}

//取屏幕大小
function getBodySize(){
	var bodySize = [];
	
	with(document.documentElement) {
	bodySize[0] = clientWidth;//(scrollWidth>clientWidth)?scrollWidth:clientWidth;
	bodySize[1] = (scrollHeight>clientHeight)?scrollHeight:clientHeight;
   }
	/*
	with(document.getElementById('divmainmiddle')) {
	bodySize[0] = (scrollWidth>clientWidth)?scrollWidth:clientWidth;		
	}
	
	bodySize[0] = 765 ;
	if(height1 >= height2)
	{
		bodySize[1]  = height1+20;
	}
	else
	{
		bodySize[1]  = height2+20;
	}*/
	return bodySize;
}

//关闭全屏层
function close_showallscreen(strurl)
{
	if(strurl != "")
	{
		self.location=strurl;
	}
	else
	{
		if(document.getElementById('movefolderid'))
		{
			document.getElementById('movefolderid').style.visibility = "visible";
		}
		if(document.getElementById("backallscreenmemo"))
		{
			document.getElementById("backallscreenmemo").parentNode.removeChild(document.getElementById("backallscreenmemo"))
		}
		if(document.getElementById("backallscreen"))
		{
			document.getElementById("backallscreen").parentNode.removeChild(document.getElementById("backallscreen"))
		}
		
		if(document.getElementById('wan_with'))
		{
			document.getElementById('wan_with').style.visibility = "visible";
		}
		if(document.getElementById('wan_age_from'))
		{
			document.getElementById('wan_age_from').style.visibility = "visible";
		}
		if(document.getElementById('wan_age_to'))
		{
			document.getElementById('wan_age_to').style.visibility = "visible";
		}
		if(document.getElementById('age_f'))
		{
			document.getElementById('age_f').style.visibility = "visible";
		}
		if(document.getElementById('age_t'))
		{
			document.getElementById('age_t').style.visibility = "visible";
		}
		if(document.getElementById('Stature_f'))
		{
			document.getElementById('Stature_f').style.visibility = "visible";
		}
		if(document.getElementById('Stature_t'))
		{
			document.getElementById('Stature_t').style.visibility = "visible";
		}
		if(document.getElementById('Avoirdupois_f'))
		{
			document.getElementById('Avoirdupois_f').style.visibility = "visible";
		}
		document.body.style.overflow = "";
	}
	return;
}

//创建全屏层
function creatediv_allscreen()
{
	var bodySize = getBodySize();
	width = bodySize[0] ;
 	height = bodySize[1];
	if(isIe)
	{
		//setSelectState();
	}
	else
	{
		//height = bodySize[1]*3;
	}
	
	var back=document.createElement("div");
	back.id="backallscreen";
	var styleStr="z-index:9998;top:0px;left:0px;position:absolute;background:#666;width:"+width+"px;height:"+height+"px;";
	styleStr+=(isIe)?"filter:alpha(opacity=40);":"opacity:0.40;";
	back.style.cssText=styleStr;
	document.body.appendChild(back);	
	//document.body.style.overflow = "hidden";
}

function open_message(strurl, intid)
{
	intwidth = 0;
	intheight = 0;
	with(document.documentElement)
	{
		intwidth = (clientWidth-790)/2;
		intheight = (clientHeight-550)/2;
	}
	window.open (strurl, '_babukumessagedata', 'height=600, width=790, top='+intheight+', left='+intwidth+', toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=yes');
}

//获取位置
function getposition(element,offset)
{
    var c=0;
    while(element)
    {
        c+=element[offset];
        element=element.offsetParent
    }
    return c;	
}

// 隐藏层
function DIV_Hidden(_target)
{
	if(document.getElementById(_target))
	{
		with(document.getElementById(_target))
		{
			style.display = "none";
		}
	}
}

//显示层
function DIV_Show(_target)
{
	if(document.getElementById(_target))
	{
		with(document.getElementById(_target))
		{
			style.display = "block";
		}
	}
}

// 隐藏层
function DIV_Show_Hidden(_target, divtitle, strshowtitle, strhiddentitle)
{
	if(document.getElementById(_target))
	{
		if(document.getElementById(_target).style.display == "none")
		{
			if(document.getElementById(divtitle))
			{
				document.getElementById(divtitle).innerHTML = strshowtitle;
			}
			document.getElementById(_target).style.display = "block";
		}
		else
		{
			if(document.getElementById(divtitle))
			{
				document.getElementById(divtitle).innerHTML = strhiddentitle;
			}
			document.getElementById(_target).style.display = "none";
		}
	}
}

//隐藏层和显示层
function show_hidden(_target1,_target2)
{
	var target1 = document.getElementById(_target1);
	var target2 = document.getElementById(_target2);
	target1.style.display = 'none';
	target2.style.display = 'block';
}

//头像大小控制
function setWidth_Vote(obj, maxwidth)
{
	if (maxwidth >0) {
  		var nWidth = parseInt( obj.width);
		if (nWidth > maxwidth) return maxwidth;
	}
	return false;
}

//头像大小控制
function setHeight_Vote(obj, maxheight)
{
	if (maxheight >0) {
  		var nheight = parseInt( obj.height);
		if (nheight > maxheight) return maxheight;
	}
	return false;
}

//更新状态图片大小控制
function setWidth_FeedPhoto(obj, maxwidth)
{
	if (maxwidth >0) {
  		var nWidth = parseInt( obj.width);
		if (nWidth > maxwidth) return maxwidth;
	}
	return false;
}
//更新状态图片大小控制
function setHeight_FeedPhoto(obj, maxheight)
{
	if (maxheight >0) {
  		var nheight = parseInt( obj.height);
		if (nheight > maxheight) return maxheight;
	}
	return false;
}
//改变层的样式
function Class_change(target_id,state,target_class)
{
	with(document.getElementById(target_id))
	{
		if(state==0)
		{
			className = target_class;	
		}
		else
		{
			className +=" " + target_class;
		}
	}
}

//清除文本框中内容
function onMousedown_Txt(obj, strkey)
{
	if(cTrim(obj.value,0) == cTrim(strkey,0))
	{
		obj.value = "";
	}
}
//清除文本框中内容
function onFocus_Txt(obj)
{
	document.getElementById(obj).style.display = "none";	
}
//填充文本框中内容
function onBlur_Txt(obj,obj_label)
{
	if(obj.value =="" || obj.value =="将您的愿望输入于此")
	{
		document.getElementById(obj_label).style.display = "block";	
		obj.value ="";
	}
}

//flash+js 拷贝功能
function copyit(_this,textit)
{
	if (!window.clipboardData)
	{
		window.clipboardData.setData("Text",textit);
	}
	else
	{
		if(document.getElementById('flashcopier')){
			document.getElementById('flashcopier').parentNode.removeChild(document.getElementById('flashcopier'));
		}
		window.clipboardData.setData("Text",textit);
		var flashcopier = "flashcopier";
		var _left =  getposition(_this,"offsetLeft");
		var _top =  getposition(_this,"offsetTop");
		if(!document.getElementById(flashcopier)){
			var divholder = document.createElement("div");
			divholder.id = flashcopier;
			document.body.appendChild(divholder);
			document.getElementById(flashcopier).style.cssText = "float:left;position:absolute;background:url(/images/copyback.gif) no-repeat;height:27px;line-height:27px;padding-left:12px;z-index:9999";
			document.getElementById(flashcopier).style.left = _left +"px";
			document.getElementById(flashcopier).style.top = _top + 22 +"px";
		}
		document.getElementById(flashcopier).style.display = "block";
		document.getElementById(flashcopier).innerHTML = "<div style='position:relative;vertical-align: middle;float:left;background:url(/images/copyback_r.gif) no-repeat right top;height:100%;padding-right:10px;margin-right:-4px;'>复制链接成功</div>";
		setTimeout("DIV_Hidden('flashcopier')",1000);
		//var divinfo = "<embed src='/swf/clipboard.swf' FlashVars='clipboard="+textit+"' width='0' height='0' type='application/x-shockwave-flash'></embed>";
		//document.getElementById(flashcopier).innerHTML = divinfo;	
		if(document.getElementById('copyurl'))
		{
			document.getElementById('copyurl').select();
		}
	}
	
}

//生成随机数
function GetRandomNum(Min,Max)
{
	var Range = Max - Min;
	var Rand = Math.random();
    return(Min + Math.round(Rand * Range));
}

//处理全屏位置
function makewinsize()
{
	if(document.getElementById('backallscreenmemo'))
	{
		var bodySize = getBodySize();
		width = bodySize[0] ;
	 	height = bodySize[1];
		if(document.getElementById('backallscreen'))
		{
			document.getElementById('backallscreen').style.width=width;
			document.getElementById('backallscreen').style.height=height;
		}
		var divmakememo = document.getElementById('backallscreenmemo');
		var h_body =document.body.clientHeight;
		var h_div = divmakememo.clientHeight+30;
		if(h_body > h_div)	
		{	
			divmakememo.style.marginTop = (h_body-h_div)/2 +"px";
		}
		else
		{
			divmakememo.style.marginTop = 0 ;
		}
	}
}

//取图片宽高
function get_headersize(obj)
{
	if(obj.offsetHeight<300)
	{
		obj.style.marginLeft = "0px";
		obj.style.width = "100%";
	}
	else
	{
		obj.style.height = "300px";
	}
}



//输入框字数变化
function InputMemoNum(strobj, maxlimit, strlable)
{
	if(document.getElementById(strobj))
	{
		var field = document.getElementById(strobj);
		if (field.value.length >= maxlimit) 
		{
			if(document.getElementById(strlable))
			{
				if(strobj == "whatdomemo")
				{
					document.getElementById(strlable).innerHTML = field.value.length;
				}
				else
				{
					document.getElementById(strlable).innerHTML = 0;
				}
			}
			field.value = field.value.substring(0, maxlimit-1);
		}
	　　else 
		{
			if(document.getElementById(strlable))
			{
				if(strobj == "whatdomemo")
				{
					document.getElementById(strlable).innerHTML = field.value.length;
				}
				else
				{
					document.getElementById(strlable).innerHTML = maxlimit-field.value.length;
				}
			}
	　　}
	}
}
var step=0;
var oldtitle = "";
//闪动的浏览器标题
function flash_title(strtitle)
{
	 step++
	if(step == 1)
	{
		oldtitle = document.title;
		document.title=strtitle;
	}
	else
	{
		document.title=oldtitle;
		 step=0;
	}
  	window.setTimeout("flash_title('"+strtitle+"')",1800);
}

//全选择
function check_all(obj, chkname)
{
	var chk = document.getElementsByName(chkname);
	if(obj.checked == true)
	{
		for (i=0;i<chk.length;i++)
		{
			chk[i].checked = true;
		}
	}
	else
	{
		for (i=0;i<chk.length;i++)
		{
			chk[i].checked = false;
			
		}
	}
	return;
}


//写点什么框操作
function onClick_Txt(strobjname, strmemo)
{
	var _text = document.getElementById(strobjname);
	with(_text)
	{
		if(value == strmemo)
		{
			value = "";
			style.color = "#000000";
			if(strobjname == "whatdomemo")
			{
				style.height = "40px";
				document.getElementById("but_whatdosave").disabled=false;
			}
		}
	}
	if(document.getElementById("smile_face"))
	{
		document.getElementById("smile_face").style.display = "block";
	}
}

function onBlur_Txt2(strobjname, strmemo)
{	
	var _text = document.getElementById(strobjname); 
	with(_text)
	{
		if(value == "" || value == null || value == strmemo)
		{
			value = strmemo;
			style.color = "#999";		
			if(strobjname == "whatdomemo")
			{
				style.height = "18px";
			}
			document.getElementById("but_whatdosave").disabled=true;
			if(document.getElementById("smile_face"))
			{
				document.getElementById("smile_face").style.display = "none";
			}
		}
		else
		{
			style.color = "#000000";
			if(document.getElementById("smile_face"))
			{
				document.getElementById("smile_face").style.display = "block";
			}
		}
	}
}

//创建提示信息框
function create_messageinfobox()
{
	var back=document.createElement("div");
	back.id="confirmmessage";
	back.style.position="absolute";
	back.style.display="block";//none
	//back.className = "confirm";
	document.body.appendChild(back);
}

//图片左右移动
var newpicmax = 0;
function share_move_pic(strtype, strmainmax, movemax, picmax, rightmax)
{//strtype=左或右, strmainmax=外框大小, movemax=每次移动多少, picmax=图片大小, rightmax=图片右边空多少
	if(newpicmax <= 0)
	{
		newpicmax = document.getElementById('NewMoreNum').value*picmax+document.getElementById('NewMoreNum').value*rightmax-rightmax-strmainmax;
	}
	var getnewlocation = parseInt(document.getElementById('DivNewMore').style.left);
	if(strtype == "next")
	{
		if(getnewlocation <= (0-newpicmax))
		{
			document.getElementById('bbk_iBeforePhoto').style.display = "block";			
			if(document.getElementById('bbk_iMorePhoto'))
			{
				document.getElementById('bbk_iBeforePhoto').style.display = "block";
				document.getElementById('bbk_iMorePhoto').style.display = "none";
			}
			if(document.getElementById('bbk_iMorePhoto2'))
			{
				document.getElementById('bbk_iBeforePhoto2').style.display = "block";
				document.getElementById('bbk_iMorePhoto2').style.display = "none";
			}
		}
		else if((getnewlocation-movemax) <= (0-newpicmax))
		{
			//alert("到最一条");
			document.getElementById('DivNewMore').style.left=getnewlocation-movemax+"px";
			if(document.getElementById('bbk_iMorePhoto'))
			{
				document.getElementById('bbk_iBeforePhoto').style.display = "block";
				document.getElementById('bbk_iMorePhoto').style.display = "none";
			}
			if(document.getElementById('bbk_iMorePhoto2'))
			{
				document.getElementById('bbk_iBeforePhoto2').style.display = "block";
				document.getElementById('bbk_iMorePhoto2').style.display = "none";
			}
		}
		else
		{
			document.getElementById('DivNewMore').style.left=getnewlocation-movemax+"px";	
			if(document.getElementById('bbk_iMorePhoto'))
			{		
				document.getElementById('bbk_iBeforePhoto').style.display = "block";
				document.getElementById('bbk_iMorePhoto').style.display = "block";
			}
			if(document.getElementById('bbk_iMorePhoto2'))
			{
				document.getElementById('bbk_iBeforePhoto2').style.display = "block";
				document.getElementById('bbk_iMorePhoto2').style.display = "block";
			}
		}
	}
	else
	{
		if(getnewlocation >= 0)
		{
			
		}
		else if((getnewlocation+movemax) >= 0)
		{
			//alert("到第一条");
			document.getElementById('DivNewMore').style.left=getnewlocation+movemax+"px";			
			if(document.getElementById('bbk_iMorePhoto'))
			{
				document.getElementById('bbk_iMorePhoto').style.display = "block";
				document.getElementById('bbk_iBeforePhoto').style.display = "none";
			}
			if(document.getElementById('bbk_iMorePhoto2'))
			{
				document.getElementById('bbk_iMorePhoto2').style.display = "block";
				document.getElementById('bbk_iBeforePhoto2').style.display = "none";
			}
		}
		else
		{
			document.getElementById('DivNewMore').style.left=getnewlocation+movemax+"px";	
			if(document.getElementById('bbk_iMorePhoto'))
			{		
				document.getElementById('bbk_iBeforePhoto').style.display = "block";		
				document.getElementById('bbk_iMorePhoto').style.display = "block";
			}
			if(document.getElementById('bbk_iMorePhoto2'))
			{
				document.getElementById('bbk_iBeforePhoto2').style.display = "block";
				document.getElementById('bbk_iMorePhoto2').style.display = "block";
			}
		}
	}
}

//首页移动图片
function index_move_pic(obj, intmainmax, intmax, movemax, strtype)
{//对像、主DIV宽度、总的内容长度、上一张或下一张
	var getnewlocation = parseInt(document.getElementById(obj).style.left);
	
	if(strtype == "next")
	{
		if(getnewlocation > (0-intmax+intmainmax))
		{
			document.getElementById(obj).style.left=getnewlocation-movemax+"px";
		}
	}
	else if(strtype == "prev")
	{
		if(getnewlocation < 0)
		{
			document.getElementById(obj).style.left=getnewlocation+movemax+"px";
		}
	}
}

//把照片显示到中间
function share_move_pic_begin(strtype, strmainmax, movemax, picmax, rightmax, intmoveleft)
{
	if(newpicmax <= 0)
	{
		newpicmax = document.getElementById('NewMoreNum').value*picmax+document.getElementById('NewMoreNum').value*rightmax-rightmax-strmainmax;
	}
	var intgetnum = (parseInt(intmoveleft)+1)*2;
	/*
	if(intgetnum<20)
	{
		var intgetlocation = parseInt(intgetnum-6)*parseInt(movemax);
	}
	else
	{
		var intgetlocation = parseInt(intgetnum)*parseInt(movemax);
	}
	*/
	var intgetlocation = parseInt(intgetnum-6)*parseInt(movemax)+(parseInt(intmoveleft)*parseInt(rightmax));
	
	var getnewlocation = parseInt(document.getElementById('DivNewMore').style.left);
	
	if(intgetnum > 6 && parseInt(intgetlocation) < parseInt(newpicmax) && newpicmax>strmainmax)
	{
		document.getElementById('DivNewMore').style.left=getnewlocation-intgetlocation+"px";
		if(document.getElementById('bbk_iMorePhoto'))
		{		
			document.getElementById('bbk_iBeforePhoto').style.display = "block";
			document.getElementById('bbk_iMorePhoto').style.display = "block";
		}
		if(document.getElementById('bbk_iMorePhoto2'))
		{
			document.getElementById('bbk_iBeforePhoto2').style.display = "block";
			document.getElementById('bbk_iMorePhoto2').style.display = "block";
		}
	}
	else if(parseInt(intgetlocation) > parseInt(newpicmax)  && newpicmax>strmainmax)
	{
		document.getElementById('DivNewMore').style.left=parseInt(getnewlocation)-parseInt(newpicmax)-parseInt(movemax)+parseInt(rightmax)+"px";
		if(document.getElementById('bbk_iMorePhoto'))
		{
			document.getElementById('bbk_iBeforePhoto').style.display = "block";
			document.getElementById('bbk_iMorePhoto').style.display = "none";
		}
		if(document.getElementById('bbk_iMorePhoto2'))
		{
			document.getElementById('bbk_iBeforePhoto2').style.display = "block";
			document.getElementById('bbk_iMorePhoto2').style.display = "none";
		}
	}
}

//显示DIV
function share_show_visibility(strname)
{
	if(document.getElementById(strname))
	{
		document.getElementById(strname).style.visibility = "visible";
	}
}

//隐藏DIV
function share_hidden_visibility(strname)
{
	if(document.getElementById(strname))
	{
		document.getElementById(strname).style.visibility = "hidden";
	}
}
//小问号提示
function showHelp(_this,strmemo)
{
	var helpdiv = document.getElementById('helpDiv');
	if(helpdiv)
	{
		helpdiv.innerHTML = "";
	}
	if(!helpdiv){
		var helpdiv = document.createElement("div");
		helpdiv.id= "helpDiv";
		helpdiv.className = "help_div";
		var outstr = '<a href="javascript:void(0);" onclick="javascript:contextHelpHide();"><img width="7" height="7" border="0" align="right" alt="关闭" src="/images/ico_close.gif"></a><br><div>'+strmemo+'</div>';
		helpdiv.innerHTML = outstr ;
		document.body.appendChild(helpdiv);
	}
	else
	{
		var outstr = '<a href="javascript:void(0);" onclick="javascript:contextHelpHide();"><img width="7" height="7" border="0" align="right" alt="关闭" src="/images/ico_close.gif"></a><br><div>'+strmemo+'</div>';
		helpdiv.innerHTML = outstr ;
	}
	var _left =  getposition(_this,"offsetLeft");
	var _top =  getposition(_this,"offsetTop");
	with(helpdiv.style){
		if(_left<920)
			left = _left +"px";
		else
			left = _left - 250 +"px";
			top = _top + 14 +"px";
		display = "block";
	}
}
	
function contextHelpHide()
{
	var helpdiv = document.getElementById('helpDiv');
	if(helpdiv){
		helpdiv.style.display = "none";
	}
}

//图片换
function share_up_down_3(strname,intflag)
{
	if(intflag == "3")
	{
		document.getElementById(strname+intflag).style.zIndex = 3;
		document.getElementById(strname+"2").style.zIndex = 2;
		document.getElementById(strname+"1").style.zIndex = 1;
	}
	else if(intflag == "2")
	{
		document.getElementById(strname+intflag).style.zIndex = 3;
		document.getElementById(strname+"3").style.zIndex = 2;
		document.getElementById(strname+"1").style.zIndex = 1;
	}
	else if(intflag == "1")
	{
		document.getElementById(strname+intflag).style.zIndex = 3;
		document.getElementById(strname+"3").style.zIndex = 2;
		document.getElementById(strname+"2").style.zIndex = 1;
	}
}

//选择图标
function sct_smile_share(strtxt, strtype)
{
	if(document.getElementById(strtxt))
	{
		//alert(strtype);
		var _text = document.getElementById(strtxt);
		_text.value = _text.value + strtype;
		_text.focus();
	}
}

function all_explore_win()
{
	window.open ('/photo/expcharm', '_exploremorephoto', 'height=600,width=900,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no, status=no');
	return;
}

function onfocus_login_email()
{
	if(document.getElementById('email'))
	{
		if(document.getElementById('email').value == "您的电子邮箱")
		{
			document.getElementById('email').style.color = "#000000";
			document.getElementById('email').value = "";
			return;
		}
	}
}

function onblur_login_email()
{
	if(document.getElementById('email'))
	{
		if(document.getElementById('email').value == "")
		{
			document.getElementById('email').style.color = "#808080";
			document.getElementById('email').value = "您的电子邮箱";
			return;
		}
	}
}