//刷新父窗口页面
function refreshOpenerPage(){
	try{
		window.opener.location.href = window.opener.location.href.replace('#','');
	}catch(e){}
}
//聚焦父窗口
function focusOpenerPage(){
	try{
		window.opener.focus();
	}catch(e){}
}

//打开新窗口。窗口风格固定，可指定窗口的宽度与高度。
function openNewWindow(strfileName,intWidth, intHeight){
	
	var d = Math.floor(Math.random() * 10000000000000000);
	var StrWindowName = d.toString();
	var splashWin=window.open(strfileName,StrWindowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1" )
	splashWin.resizeTo(intWidth ,intHeight);
	var intLeft,intTop;
	intLeft=(screen.availwidth - intWidth)/2
	intTop= (screen.availheight - intHeight)/2
	splashWin.moveTo(intLeft,intTop);
	splashWin.focus();
}

// function mousemenu(){return false;}
// document.oncontextmenu =mousemenu;

function scrollit_r2l(seed)       
{
	var m1  = "欢迎访问本网站！" ;
	var m2  = " " ;
	var msg=m1+m2;
	var out = " ";
	var c = 1;
	var speed  = 200;
	var timerTwo;
	if (seed > 100)       
	{
		seed-=2;       
		var cmd="scrollit_r2l(" + seed + ")";
		timerTwo=window.setTimeout(cmd,speed);
	}
	else if(seed <= 100 && seed > 0)       
	{
		for (c=0 ; c < seed ; c++)       
			out+=" ";
		out+=msg;
		seed-=2;
		var cmd="scrollit_r2l(" + seed + ")";
		window.status=out;
		timerTwo=window.setTimeout(cmd,speed);
	}               
	else if(seed <= 0)        
	{
		if (-seed < msg.length)
		{
			out+=msg.substring(-seed,msg.length);
			seed-=2;
			var cmd="scrollit_r2l(" + seed + ")";
			window.status=out;
			timerTwo=window.setTimeout(cmd,speed);
		}
		else
		{
			window.status=" ";
			timerTwo=window.setTimeout("scrollit_r2l(100)",speed);
		}
	}
}
scrollit_r2l(100);
