var windowObj = 0;
function fullwindow1(theURL) {
	windowObj=1;
	var isWin=(navigator.appVersion.indexOf("Win")!=-1)? true : false;
	var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)? true : false;
	if(isWin&&isIE){
		window.open(theURL,'contents','fullscreen=yes');
	}else{
		var str="left=0,screenX=0,top=0,screenY=0";
		if(window.screen){
			var ah=screen.availHeight;
			var aw=screen.availWidth;
			str+=",height="+ah;
			str+=",width="+aw;
		}
		var tmp=window.open(theURL,'contents',str);
		tmp.moveTo(0,0);
		tmp.resizeTo(aw,ah);
	}
}
function fullwindow2(theURL) {
  popwindow = window.open(theURL,"contents","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,outerwidth=" + screen.availWidth + ",outerheight=" + screen.availHeight + ",top=0,left=0");
  popwindow.window.focus();
  x = 0;
  y = 0;
  popwindow.window.moveTo(x,y);
  popwindow.resizeTo(screen.availWidth,screen.availHeight)
}
function fullwindow3(theURL) {
  popwindow = window.open(theURL,"csW",'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=1280,height=880');
  popwindow.window.focus();
  wx = 1280;
  wy = 880;
  x = (screen.width - wx ) /2;
  y = (screen.height - wy ) /2;
  popwindow.window.moveTo(x,y);
  }
function fullwindow(theURL){
	if(screen.availWidth>1280){
		if(navigator.platform.charAt(0) =="W"){
		if(navigator.appName.charAt(0) =="N"){
			fullwindow3(theURL);
		}
		if(navigator.appName.charAt(0) =="M" && navigator.userAgent.indexOf("Opera") ==-1){
			fullwindow3(theURL);
		}
		if(navigator.userAgent.indexOf("Opera")!=-1){
			fullwindow3(theURL);
		}
	}
	if(navigator.platform.charAt(0) =="M"){
		fullwindow3(theURL);
	}
	}
	if(screen.availWidth<=1280){
	if(navigator.platform.charAt(0) =="W"){
		if(navigator.appName.charAt(0) =="N"){
			fullwindow1(theURL);
		}
		if(navigator.appName.charAt(0) =="M" && navigator.userAgent.indexOf("Opera") ==-1){
			fullwindow2(theURL);
		}
		if(navigator.userAgent.indexOf("Opera")!=-1){
			fullwindow2(theURL);
		}
	}
	if(navigator.platform.charAt(0) =="M"){
		fullwindow1(theURL);
	}
	}
}

function Back(theURL) {
	if (opener.closed){
	NewWin=window.open(" ","MWindow");
	NewWin.location.href=theURL;
	window.focus()
	}
	else{opener.location.href=theURL}
	window.focus()
}

