function winload(left,top,name)
{
  var Obj = eval(name);
      Obj.style.top=top;
      Obj.style.left=left;
}
//----------------------------绝对位置初始化的设置------------------------------------//
function initAbsolute(left,top,name,content,link){	
	if(link =="")
		{
		document.write('<div id=\"'+ name + '\" style=\"position: absolute;visibility:visible;z-index:1\">'+ content + '</div>');
		}
	if(link !="") 
		{
		document.write('<div id=\"'+ name + '\" style=\"position: absolute;visibility:visible;z-index:1\"><a href=\"' +link +'\" target=\"_blank\">' + content + '</a></div>');
		}
	winload(left,top,name);
}

//-----------------------------------------设置cookies--------------------------------------------//
function setCookie() 
{ 
  var FromUrl=window.location.toString();
      FromUrl=FromUrl.replace("http://","");
  	  FromUrl=FromUrl.replace("www.","");
	    FromUrl=FromUrl.substring(0,FromUrl.indexOf("/"));
  var now=new Date();
//set cookie  expires date 1000ms*60*60
  now.setTime( now.getTime() + 1000 * 60 * 60 );
  var the_cookie = "FromUrl="+FromUrl+";expires="+now.toGMTString()+";path=/";
  document.cookie = the_cookie;//write Cookie
} 

function readCookie()
{
  var the_cookie = document.cookie; 
  return the_cookie;
}
  setCookie();
 
//----------------------------cookies is end------------------------------------------------------//
 
 
 



//----------------------------对IE里滚动条的纵向操作进行的设置------------------------------------//
function vertical_myload(picheight,picleft,name)
{
	var Obj = eval(name);
	if((picheight>document.body.offsetHeight)&&(document.body.scrollTop==0))
 	{
 		Obj.style.top = 8;
 	}
 	else
 	{ 		
		Obj.style.top=document.body.scrollTop+document.body.offsetHeight-picheight+8;
	}
		
 	if((picheight>document.body.offsetHeight)&&(document.body.scrollTop>0))
 	{
 		Obj.style.top = document.body.scrollTop+8;
 	}
 	else
 	{ 		
		Obj.style.top=document.body.scrollTop+document.body.offsetHeight-picheight+8;
	} 	
 	
	Obj.style.left=picleft;
	horizontal_leftmove(picheight,picleft,name);
}
//----------------------------对IE里滚动条的横向操作进行的设置------------------------------------//
function horizontal_leftmove(picheight,picleft,name)
 {
 	var Obj = eval(name);
 	var strObj = Obj.id;
 			
 	if((picheight>document.body.offsetHeight)&&(document.body.scrollTop>=0))
 	{
 		Obj.style.top = document.body.scrollTop+8;
 	}
 	else
 	{ 		
		Obj.style.top=document.body.scrollTop+document.body.offsetHeight-picheight+8;
	}
	
	
	 	
	Obj.style.left=document.body.scrollLeft+picleft;
	
	setTimeout('horizontal_leftmove('+picheight+','+picleft+','+strObj+');',80);
	
}
//----------------------------相对位置初始化的设置------------------------------------//
//对应xsl中参数的说明
//纵向高度   picheight,
//横向长度   picleft,
//对应的id   name,
//文字的内容 content,
//文字的链接 link
function initRelative(picheight,picleft,name,content,link){
	document.write('<div id=\"' +name+ '\" style=\"position:absolute;width:120;top:300;visibility: visible;z-index: 1\"><a href=\"'+link +'\" target=_blank>' +content+'</a></div>');
	vertical_myload(picheight,picleft,name);
}