/* browser identification: */
var isIE4 = ( navigator.appVersion.indexOf( "MSIE" ) != -1 && parseFloat( navigator.appVersion ) >= 4 ) ? true : false;
var isNN4 = ( navigator.appName=='Netscape' && parseFloat( navigator.appVersion ) < 5 ) ? true : false;
var isNN6 = ( navigator.appName=='Netscape' && parseFloat( navigator.appVersion ) >= 5 ) ? true : false;
var is4Plus = ( isIE4 || isNN4 || isNN6 );
var fFullVer = parseFloat( navigator.appVersion.indexOf( "MSIE" ) != -1 ? navigator.appVersion.substr( navigator.appVersion.indexOf( "MSIE" ) + 5 ) : navigator.appVersion );
var children = new Array();

function openPopupWindow(url,width,height_ie,height_nn4,height_nn6,scrlbars,toolbar,menubar,resizable,location)
{

	
	if( !scrlbars )	
		scrlbars='no';	
	
	if( !toolbar )	
		toolbar='no';	

	if( !menubar )	
		menubar='no';
	
	if( !resizable )	
		resizable='no';	
	
	if( !location )
		location='no';

	if( !height_nn4 )	
		height_nn4=eval(height_ie);	
		
	if( !height_nn6 )	
	  	height_nn6=eval(height_nn4);	
		
	if( isIE4 )	
		height=eval(height_ie);	
	if( isNN4 )	
	  	height=eval(height_nn4);	
	if( isNN6 )	
	 	height=eval(height_nn6);	
		
	
	window.open(url,null,'width='+eval(width)+',height='+eval(height)+',status=no,scrollbars='+scrlbars+',toolbar='+toolbar+',menubar='+menubar+',location='+location+',resizable='+resizable,false);
	return (false);
}

function test(){
	alert('Test Result');
}

 //we may define a custom word/text for the print and close labels, good for using I18N integration
function PrintPageWindow(divName, printText, closeText)
{
	var disp_setting="toolbar=yes,location=no,directories=no,menubar=no,";
    disp_setting += "scrollbars=yes,width=670, height=640, left=100, top=25, resizable = no"; 

    var content_vlue = document.getElementById(divName).innerHTML; 
    
    var docprint=window.open("","",disp_setting); 
        docprint.document.open();
        docprint.document.write('<html><head><title>LaLey</title><link href="../App_Themes/ThemeLaLey/LaLey.css" type="text/css" rel="Stylesheet" /> '); //<link href="App_Themes/ThemeSMG/Styles.css" type="text/css" rel="Stylesheet" />
        docprint.document.write('</head><body>');
        docprint.document.write('<div style="height:6em;">'); //div that holds the header
			docprint.document.write('<div style="float:left"><div style="float:left" class="LaLeyLogo"><img src="../Images/site_logo.gif" border="0"></div></div><br><br>');
			docprint.document.write('<div style="cursor:hand;float:left" ><u><a style="cursor:pointer;" title="Print" value="Print" rel="nofollow" onclick="self.print();">');
			if (printText == null || printText == '') 
			{
				docprint.document.write('Imprimir'); //defaut label value
			} else 
			{
				docprint.document.write(printText);
			}
			docprint.document.write('</a></u>&nbsp;|&nbsp;<u><a  style="cursor:pointer;" target="blank" title="Close" value="Close" rel="nofollow" onclick="window.close();">');
			if (closeText == null || closeText == '') 
			{
				docprint.document.write('Cerrar'); //defaut label value
			} else 
			{
				docprint.document.write(closeText);
			}
			docprint.document.write('</a></u></div><br>');
        docprint.document.write('</div>');
        docprint.document.write(content_vlue); //here we show the search results or any html contetn we wish   
        docprint.document.write('</body></html>'); 
        docprint.document.close(); 
        docprint.focus();
    }

	//we should depricate this method in the future
    function PrintPage(divname) {
    	PrintPageWindow(divname, null, null);
    }

