function OpenWindow(strURL)
{
	strOptions = "height=400,width=400,top=100,left=100,scrollbars=no,status=yes";
	window.open(strURL,"webForm",strOptions);
}

function OpenReportWindow(strURL)
{
    intWidth = 750;
    intHeight = 550;
	strOptions = "height=" + intHeight + ",width=" + intWidth + ",top=100,left=100,scrollbars=yes,resizable=yes,status=yes";
	window.open(strURL,"",strOptions);
}

function OpenCustomWindow(strURL,intWidth,intHeight)
{
	strOptions = "height=" + intHeight + ",width=" + intWidth + ",top=100,left=100,scrollbars=yes,resizable=yes,status=yes";
	window.open(strURL,"webForm",strOptions);
}

function PreviewWindow(strURL)
{
	strOptions = "height=600,width=800,top=10,left=10,scrollbars=yes,status=yes,resizable=yes";
	window.open(strURL,"",strOptions);
}

function gotoURL(obj)
{
	strURL = obj.value;
	location.href = strURL;
}

function PreviewImage(strURL)
{
	intWidth = screen.width / 2;
	intHeight = screen.height / 2 ;
	intWidth = 120;
	intHeight = 100;
	strOptions = "height=400,width=750,top=" + intHeight + ",left=" + intWidth + ",scrollbars=yes,status=yes,resizable=yes";
	window.open(strURL,"",strOptions);
}

function RefreshParentWindow()
{
    var strURL = window.opener.location;  
    window.opener.location.href = strURL;
	window.close();
	window.opener.focus();
    
	//window.opener.location.reload(true);
	//window.close();
	//window.opener.focus();
	
}//function

function ConfirmDelete(strURL)
{
	if (confirm("Are you sure you want to delete this record?"))
	{
	    location.href = strURL;
	}    
}

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }

function show(banner_id)
   {
   document.getElementById(banner_id).style.display = "block";
   }

function hide(banner_id)
   {
   document.getElementById(banner_id).style.display = "none";
   }

 function valRadioButton(btnObject) {

	/* Helper function to validate the radiobuttons */	
	
	var intCount = -1;
	for (var i=btnObject.length-1; i > -1; i--) {
	   if (btnObject[i].checked) {intCount = i; i = -1;}
	   }
	if (intCount > -1) return btnObject[intCount].value;
	else return null;
			
 }
 
