function openWin(strUrl,winName,width,height) {	
	x=(screen.availWidth-width)/2
	y=(screen.availHeight-height)/2
	window.open(strUrl,winName,"width="+width+",height="+height+",left="+x+",top="+y+",scrollbars=yes")	
}


function writeTool() {
	document.write("<br class='clearfloat' /><div class='toolBar'><ul><li><a href='javascript:history.back(-1)'>返回上页</a></li><li><a href='/'>返回首页</a></li><li><a href='#top'>回到顶部</a></li></ul></div>");
}


/*
add 080103
功能：图片的动态转换
*/

var imageholder=new Array()
var ie55=window.createPopup

function slideit(strSrc){
	//alert(parent.document.images.length)
	if (!document.images) return
	if (ie55) document.images.pic_show.filters[0].apply()
	document.images.pic_show.src=strSrc
	if (ie55) document.images.pic_show.filters[0].play()
}

function showBigPic(strSrc) {
	//取消按钮的选中状态
	theseObj=document.all("picText_allPage").getElementsByTagName("DD");
	
	//显示加载的图片提示
	document.all("loading").style.display="";
	document.all("pic_show").style.display="none";
	for (n=0;n<theseObj.length;n++) {
		theseObj[n].className="";		
	}
	//开始动态转换
	slideit(strSrc);
}



/*
图片说明的文字列表翻页,目前应用在电子杂志的翻页
*/
function setPicText_page(intPage) {	
	theseObj=document.all("picText_allPage").getElementsByTagName("DD");
	for (n=0;n<theseObj.length;n++) {
		theseObj[n].style.display="none";		
	}	
	theseObj=document.getElementsByName("picText_page"+intPage);
	for (n=0;n<theseObj.length;n++) {
		theseObj[n].style.display="";
	}
}

function imgHasLoaded(thisObj) {	
	document.all("loading").style.display="none";
	thisObj.style.display="";
}


var originalClassNameString;
originalClassNameString="";
//对所有的input 和 textarea 批量用CSS控制
function formatInput(strID){   
	var   a   =   document.getElementById(strID).getElementsByTagName("INPUT"); 
	for   (var   i=0;   i<a.length;   i++)  {
		if(a[i].type=="text" || a[i].type=="password") {
			a[i].className="input_text";
			a[i].onfocus=function() {
				originalClassNameString = this.className;
				this.className+=" focus"; 
			};
			a[i].onblur=function() {
				this.className=originalClassNameString; 
			};
		}
	} 
	
	
	var   a   =   document.all(strID).getElementsByTagName("textarea"); 
	for   (var   i=0;   i<a.length;   i++)  {
			a[i].className="input_text";
			a[i].onfocus=function() {
				originalClassNameString = this.className;
				this.className+=" focus"; 
			};
			a[i].onblur=function() {
				this.className=originalClassNameString; 
			};
	} 
	
}

function tagEventEffect(type,tag, parentId) { 	
	if (window.attachEvent) {   
		window.attachEvent("onload", function() {
		var sfEls = (parentId==null)?document.getElementsByTagName(tag):document.getElementById(parentId).getElementsByTagName(tag);  		type(sfEls);   
		});   
	}  	
}
sfHover = function(sfEls) {
	for (var i=0; i < sfEls.length; i++) { 
		sfEls[i].onmouseover=function() {
			originalClassNameString = this.className;
			this.className+=" over"; 
		}
		sfEls[i].onmouseout=function() {   
			this.className=originalClassNameString; 			
		}
	}   
} 

function submitForm(thisObj,url,prop) {
    thisObj.action=url+"?u="+escape(self.location)+"&"+prop;
}
function addProp(prop) {	//获取本页面地址构造参数值并跳转回本页面
    location.href=top.location+"&"+prop;
}

function goto(url,prop) {
	location.href=url+"?u="+escape(self.location)+"&"+prop;
}