//////////////////////////////////////////
//popwindow.js
//Client functions for popping up a window
//////////////////////////////////////////


function popWindow (URL, width, height, resizable) 
{
	screenWidth = 350;

    if ( parseInt(navigator.appVersion) >= 4 )
		screenWidth = screen.width - width;
    
	winname=width+'_'+height;
	//thepopup=window.open(URL,winname,'top=100,left='+screenWidth+',toolbar=no,directories=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable='+(resizable?'yes':'no')+',copyhistory=no,width='+width+',height='+height);
	thepopup=window.open(URL,winname,'toolbar=no,directories=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable='+(resizable?'yes':'no')+',copyhistory=no,width='+width+',height='+height);	
	thepopup.focus();
}

function popwin (URL){
	thepopup=window.open(URL,'langlay','toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=630,height=530');	
	thepopup.focus();
}

function popSizedWin (URL, width, height){
	thepopup=window.open(URL,'sized','toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+width+',height='+height);	
	thepopup.focus();
}

function popNewsWindow (URL){
	thepopup=window.open(URL,'news','toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=520,height=650');	
	thepopup.focus();
}

function popNormalWindow (URL, width, height) 
{
	winname=width+'_'+height;
	thepopup=window.open(URL,winname,'toolbar=yes,directories=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height);	
	thepopup.focus();
}

function closePopWindow(){ window.close(); }

function popContentWindow(index, obj, width, height) 
{
	thepopup=window.open('',obj.name(i),'toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height);
	thepopup.document.write(obj.HTMLcontent(index));
	thepopup.focus
}


