//window.status="页面正在加载中..."
//if(!document.uniqueID) show_openpg_Error();
//function show_openpg_Error(){
//alert('\n本站目前暂不支持非Micorsoft Internet Explorer浏览器!\n\nhttp://www.ysplh.com(中国艺术品联合网)');
//window.location='http://www.google.cn/search?hl=zh-CN&q=%E4%B8%AD%E5%9B%BD%E8%89%BA%E6%9C%AF%E5%93%81%E8%81%94%E5%90%88%E7%BD%91'
//}
function ParamControl()
{
	this.Ulmarquee2=function(id,UlmaHeight,UlmaCols,UlmaSpeed,UlmaPause){
		var el=document.getElementById(id);
		var ls=0;
		el.pt=0;
		el.st=0;
		el.fc="#000"
		el.ss=false;
		el.ls=el.getElementsByTagName("LI").length;
		ls=(el.ls/UlmaCols).toString();
		if(ls.indexOf(".")) ls=parseInt((el.ls/UlmaCols)*2);
		else ls=parseInt(el.ls/UlmaCols);
		el.ls=ls;
		el.UlmaHeight=UlmaHeight;
		el.UlmaSpeed=UlmaSpeed;
		el.UlmaPause=UlmaPause;
		el.ff=0;
		el.innerHTML+=el.innerHTML;
		var $e=el.getElementsByTagName("LI");
		var $tmp="";
		for(var $i=0;$i<(ls*UlmaCols);$i++){
			$tmp+="<li>"+$e[$i].innerHTML+"</li>"
		}
		el.innerHTML=$tmp;
		$tmp=null;
		with(el){
			style.position="absolute";
			style.height=UlmaHeight+"px";
			noWrap=false;
			onmouseover=UlmaStop;
			onmouseout=UlmaDrop;
			style.posTop=0;
			style.top=el.ff+"px";
			style.posLeft=0;
		}
		el.innerHTML+=el.innerHTML;
		el.ct=UlmaHeight;
		el.tt=-parseInt(UlmaHeight*el.ls);
		setInterval(scrollUpforMSIE,el.UlmaSpeed);
			
		function scrollUpforMSIE(){
			//document.getElementById("aa").innerHTML=el.style.posTop+"__"+el.tt+"__"+el.ls;
			if(el.ss==true) return;
			el.ct+=1;
			if(el.ct==el.UlmaHeight+1){
				el.st+=1; el.ct-=1;
				if(el.st==el.UlmaPause){el.ct=0; el.st=0;}
			}else {
				el.pt=(--el.style.posTop);
				if(el.pt==el.tt){el.style.posTop=0;}
			}
		}
		function UlmaStop(){el.ss=true;}
		function UlmaDrop(){el.ss=false;}
	}
	this.Ulmarquee=function(id,UlmaHeight,UlmaSpeed,UlmaPause){
		window.status="完成"
		var el=document.getElementById(id);
		el.pt=0;
		el.st=0;
		el.fc="#000"
		el.ss=false;
		el.ce=0;
		UlmaLists = el.getElementsByTagName("LI").length;
		el.UlmaLists=UlmaLists;
		el.UlmaHeight=UlmaHeight;
		el.UlmaSpeed=UlmaSpeed;
		el.UlmaPause=UlmaPause;
		el.ff=0;
		
		with(el){
			style.height=UlmaHeight+"px";
			noWrap=false;
			onmouseover=UlmaStop;
			onmouseout=UlmaDrop;
			style.posTop=0;
			style.top=el.ff+"px";
			style.posLeft=0;
		}
		
		el.ct=UlmaHeight;
		el.innerHTML+=el.innerHTML;
		el.tt=-(UlmaHeight*UlmaLists);
		if(el.ce!=0) {
			setInterval(scrollUpforFF,el.UlmaSpeed);
		}
		else
		{
			setInterval(scrollUpforMSIE,el.UlmaSpeed);
		}
			
		function scrollUpforMSIE(){
			//document.getElementById("aa").innerHTML=el.style.posTop+"__"+el.tt+"__"+UlmaLists;
			if(el.ss==true) return;
			el.ct+=1;
			if(el.ct==el.UlmaHeight+1){
				el.st+=1; el.ct-=1;
				if(el.st==el.UlmaPause){el.ct=0; el.st=0;}
			}else {
				el.pt=(--el.style.posTop);
				if(el.pt==el.tt){el.style.posTop=0;}
			}
		}
			
		function scrollUpforFF(){
			if(el.ss==true) return;
			el.ct+=1;
			if(el.ct==el.UlmaHeight+1){
				el.st+=1; el.ct-=1;
				if(el.st==el.UlmaPause){el.ct=0; el.st=0;}
			}else {
				el.pt=(--el.ff);
				el.style.top = el.pt + "px";
				if(el.pt==el.tt){el.ff=0;}
			}
		}
		function UlmaStop(){el.ss=true;}
		function UlmaDrop(){el.ss=false;}
	}
	this.FormatSize=function(obj,ww,hh)
	{
		try{
			var el = document.getElementById(obj).getElementsByTagName("IMG");
		}catch(e){
			return true;
		}
		if(el!=undefined) for(var k=0;k<el.length;k++)
		{
			if(el[k].height > el[k].width & el[k].height > hh)
			{
				el[k].width = el[k].width * (hh/el[k].height);
				el[k].height= hh;
			}else if (el[k].width > el[k].height & el[k].width > ww)
			{
				el[k].height = el[k].height * (ww/el[k].width);
				el[k].width = ww;
			}else if (el[k].width > ww){
				el[k].width = ww;el[k].height= ww;
			}
			if(el[k].height > el[k].width & el[k].height > hh)
			{
				el[k].width = el[k].width * (hh/el[k].height);
				el[k].height= hh;
			}else if (el[k].width > el[k].height & el[k].width > ww)
			{
				el[k].height = el[k].height * (ww/el[k].width);
				el[k].width = ww;
			}else if (el[k].width > ww){
				el[k].width = ww;el[k].height= ww;
			}
			//alert(el[k].width);
		}
	}
	this.Js_Loader=function(file){
		var js_load=document.createElement("script");
		js_load.setAttribute("type","text/javascript");
		js_load.setAttribute("src",file);
		try{document.body.appendChild(js_load)}
		catch(e){throw new Error("Link to file"+file+" faild .")}
	}
}
function echoImage(id)
{
	SetImage = new document.getElementById(id);
	SetImage.src = document.getElementById("pass_"+id).value
	if(SetImage.height > SetImage.width & SetImage.height > 100)
	{
		SetImage.width = SetImage.width*100/SetImage.height;
		SetImage.height= 100;
	}
	else if (SetImage.height < SetImage.width & SetImage.width > 100)
	{
		SetImage.width = 100;
		SetImage.height= SetImage.height*100/SetImage.width;
	}
}
function Addme(){ 
	var url = window.location; 
	var title = document.title; 
	window.external.AddFavorite(url,title); 
}
function setHomePage(e){
	e.style.behavior="url(#default#homepage)";
	e.setHomePage(window.location);
}
function _pop(url){
	window.open(url,'','status=no,toolbar=no,location=no')
}
