/*-----------------------------------------------------/
 *描述：页面常使用到的JS函数
 *版本：v2.0
 *修改时间：2006-4-7
 *-----------------------------------------------------*/
	/*
	*函数名称：goToUrl(url);
	*功能描述：取得月份的第一天为星期几;
	*参数：
	*    @theYear:年
	*    @theMonth:月
	*/
	function goToUrl(url){
		top.window.location = url;
	}
	/**
	 * 函数名：mover
	 * 功能：当鼠标移到按钮时，按钮的样式发生变化
	 * 参数：
	 *    @oEvent //鼠标移到哪个按钮
	 */
	function mover(oEvent){
		oEvent.className = 'hover';
	}

	/**
	 * 函数名：mover
	 * 功能：当鼠标移开按钮时，按钮的样式发生变化
	 * 参数：
	 *    @oEvent //鼠标移开哪个按钮
	 */
	function mout(oEvent){
		oEvent.className = '';
	}

	/*
	*函数名称：areYouDelete;
	*功能描述：用户删除操作时的提示;
	*/
	function areYouContinue(mess){
		if(confirm(mess)){
			return true;
		}
		else{
			return false;
		}
	}

	/*
	*函数名称：chbgColor;
	*功能描述：鼠标经过时改变一行背景颜色;
	*参数：
	*  @obj  经过的对象
	*  @tp in or out  判断是否经过
	*/
	function chbgColor(obj,tp){
		if(tp=="in"){
			obj.style.background="#F0F0F0";
		}
		else{
			obj.style.background="#FFFFFF";
		}
	}
	
	/*
	*函数名称：getFocus;
	*功能描述：当input获得焦点后改变提示的背景着色"adviseHint"或"greenHint";
	*参数：
	*  @obj  获得焦点的input对象
	*  @id   需要改变提示的ID
	*/
	function getFocus(obj,id){
		if (document.getElementById(id).outerText != ""){
			if (obj.advise == "yes")
				document.getElementById(id).className = "adviseHint";
			else
				document.getElementById(id).className = "greenHint";
		}
	}
	
	/*
	*函数名称：getFocus;
	*功能描述：当input失去焦点后改变提示的背景着色成"noHint";
	*参数：
	*  @id   需要改变提示的ID
	*/
	function lostFocus(id){
		document.getElementById(id).className = "noHint";
	}
	
	/*
	*函数名称：churl;
	*功能描述：查询是不是正确的URL;
	*参数：
	*  @obj   需要要检查的input对象
	*/
	function churl(obj){
		
		str = obj.value;
		docStr=str.substring(0,10);
		ds = docStr.toLocaleLowerCase();

		if (ds.indexOf("://") == "-1"){

			str="http://"+obj.value;
		
		}
		else{
	
			str=obj.value;
			
		}
		obj.value=str;
	}

	/*
	*函数名称：ttOver;
	*功能描述：头部菜单鼠标经过;
	*参数：
	*  @obj   需要经过的按钮
	*/
	function ttOver(obj){
		obj.style.backgroundImage="url(/images/se_09.gif)";
	}

	/*
	*函数名称：ttOver;
	*功能描述：头部菜单鼠标移出;
	*参数：
	*  @obj   需要移出的按钮
	*/
	function ttOut(obj){
		obj.style.backgroundImage="";
	}

	/*
	*函数名称：clsOver;
	*功能描述：网友共享分类鼠标经过;
	*参数：
	*  @obj   需要经过的按钮
	*/
	var clsBkcolor="";
	function clsOver(obj){
		clsBkcolor=obj.style.backgroundColor;
		obj.style.backgroundColor="#ffffff";
	}

	/*
	*函数名称：clsOver;
	*功能描述：网友共享分类鼠标移出;
	*参数：
	*  @obj   需要移出的按钮
	*/
	function clsOut(obj){
		obj.style.backgroundColor=clsBkcolor;
	}

	
	/*
	*函数名称：classmover;
	*功能描述：网友共享分类文件夹鼠标经过;
	*参数：
	*  @obj   需要移出的按钮
	*/
	function classmover(obj){
		obj.style.backgroundColor="#E6F2FF";
		obj.style.border="1px solid #9DCEFF";
	}
	/*
	*函数名称：classmout;
	*功能描述：网友共享分类文件夹鼠标移出;
	*参数：
	*  @obj   需要移出的按钮
	*/
	function classmout(obj){
		obj.style.backgroundColor="";
		obj.style.border="1px solid #ffffff";
	}

	/*
	*函数名称：classmover2;
	*功能描述：网友共享二级分类文件夹鼠标经过;
	*参数：
	*  @obj   需要移出的按钮
	*/
	function classmover2(obj){
		obj.style.backgroundColor="#F3FFD3";
		obj.style.border="1px solid #DEF6A1";
	}
	/*
	*函数名称：classmout2;
	*功能描述：网友共享二级分类文件夹鼠标移出;
	*参数：
	*  @obj   需要移出的按钮
	*/
	function classmout2(obj){
		obj.style.backgroundColor="";
		obj.style.border="1px solid #ffffff";
	}
	
	/*用户新共享网址的预览
	 * shPreview()
	 * chbk()
	 */
	function shPreview(id,shurl){
		var shid = "sh"+id;
		var shframe = "shframe"+id;
		var obj = document.getElementById(shid);
		if (obj.style.display=="none"){
			frames[shframe].location.href=shurl;
			obj.style.display="block";
		}
		else{
			obj.style.display="none";
		}
	}	
	
	function chbk(obj){
		if(obj.innerText=="预览")
			obj.innerText="关闭预览";
		else
			obj.innerText="预览";
	}

/**
 * mover()
 * mout()
 * 关键词的鼠标效果
 */
function mover2(obj){
		obj.style.backgroundColor="#EBEBEB";
	}
function mout2(obj){
	obj.style.backgroundColor="#F6F6F6";
}

/**新分面动作**/
var tempCname;
function pgOver(cobj){
	tempCname=cobj.className;
	if (tempCname!="pgtubut"){
		cobj.className="pgcurbut";
	}
	else{
		cobj.className="pgtucurbut";
	}
}
function pgOut(cobj){
	cobj.className=tempCname;
}
function addFace(fstr){
	var obj = document.getElementById("content");
	obj.value = obj.value+"[:"+fstr+"]";
}