function createPopup(mywindow,windowID,width,height,url,htmlData,location,menubar,toolbar,status,titlebar,scrollbars)
{
	location = location==true?"location=yes":"location=no";
	menubar = menubar==true?"menubar=yes":"menubar=no";
	toolbar = toolbar==true?"toolbar=yes":"toolbar=no";
	status = status==true?"status=yes":"status=no";
	titlebar = titlebar==true?"titlebar=yes":"titlebar=no";
	scrollbars = scrollbars==true?"scrollbars=yes":"scrollbars=no";
		
	var options = [location,menubar,toolbar,status,titlebar,scrollbars,width!=null ? "width="+width:"",height!=null ? "height="+height:""];
	var optionsStr = "";
	for(var x=0;x<options.length;x++)
	{
		var addComm=x<options.length-1?",":"";
		optionsStr+=options[x]+addComm;
	}
	try{mywindow.close();}catch(e){}
	mywindow = window.open (url!=null?url:"",windowID,optionsStr);
	if(width!=null && height!=null)mywindow.moveTo((screen.width-width)/2,(screen.height-height)/2);

	mywindow.document.open();
	if(htmlData)mywindow.document.write(htmlData);
	mywindow.document.close();
}
function changeURL(inUrl)
{
	if(inUrl!=null)window.location = inUrl;
}


function openNewWindow(a_url)
{
	window.open(a_url);
}