function OpenNewWindowByOptions(options,iWidth, iHeight, sURL, sName)
{
	for (i = 0; i <options.length; i++)
	{
		if(options[i].checked)
		{
			sURL = sURL + options[i].value +'=1&';
		}
	}
	cx = screen.width /2 - (iWidth/2);
	window.open(sURL, sName , "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+iWidth+",height="+iHeight+",left = "+cx+",top =15")
}

function closeWindowOnClick() 
{
	window.print();
	window.close();
}


function launchWindow (iWidth, iHeight, URL) {
	day = new Date();
	id = day.getTime();
	cx = screen.width /2 - (iWidth/2)
	cy = screen.height/2 - (iHeight/2)
    window.open(URL, id , "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+iWidth+",height="+iHeight+",left = "+cx+",top ="+cy)
}

var oGlobalWindowHandler 

function launchNamedWindow (sName, iWidth, iHeight, URL) {
	day = new Date();
	id = day.getTime();
	cx = screen.width /2 - (iWidth/2)
	cy = screen.height/2 - (iHeight/2)
    oGlobalWindowHandler = window.open(URL,  sName,  "toolbar=yes,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width="+iWidth+",height="+iHeight+",left = "+cx+",top ="+cy)
}


function isRadioChecked(oRadioButton)
{
	var isChecked = false;
	for (i =0;i < oRadioButton.length;i++)
	{
		if (oRadioButton[i].checked) 
		{
			isChecked = true;
		}
	}
	
	return isChecked;
}



