
/* 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();

/* error handling, stop messages: */
/*function handlerWindowOnError()
{
	return true;
}
window.onError = handlerWindowOnError;*/

/* writes browser-dependent string to document: */
function writeBrowserDependent( szPrefix, szIE4, szNN4, szNN6, szSuffix, szOthers )
{  
	if( isIE4 )
	{
		document.write( szPrefix + szIE4 + szSuffix );
		return;
	}
	if( isNN4 )
	{  
		document.write( szPrefix + szNN4 + szSuffix );
		return;
	}
	if( isNN6 )
	{   
		document.write( szPrefix + szNN6 + szSuffix );
		return;
	}

	document.write( szPrefix + szOthers + szSuffix );
}

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 openPopupWindowWithDependecy(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);	
		
	children[children.length] = window.open(url,name,'width='+eval(width)+',height='+eval(height)+',status=no,scrollbars='+scrlbars+',toolbar='+toolbar+',menubar='+menubar+',location='+location+',resizable='+resizable,false);
	return (false);
}


function closeChildren(){
	for(i=0;i<children.length;i++){
			children[i].close();		
	}
	children.length = 0;
}


function openPopupAdobeReader(url,width,height_ie,height_nn4,height_nn6,scrlbars,toolbar,menubar,resizable)
{

	if( !scrlbars )	
		scrlbars='yes';	
	
	if( !toolbar )	
		toolbar='yes';	

	if( !menubar )	
		menubar='yes';
	
	if( !resizable )	
		resizable='yes';	

	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,'win1','width='+eval(width)+',height='+eval(height)+',status=yes,scrollbars='+scrlbars+',toolbar='+toolbar+',menubar='+menubar+',location=yes,resizable='+resizable,false);
	return (false);
}

function openPopupClickChat(url,width,height_ie,height_nn4,height_nn6,scrlbars,toolbar,menubar,resizable)
{

	if( !scrlbars )	
		scrlbars='yes';	
	
	if( !toolbar )	
		toolbar='no';	

	if( !menubar )	
		menubar='no';
	
	if( !resizable )	
		resizable='yes';	

	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,'win2','width='+eval(width)+',height='+eval(height)+',status=no,scrollbars='+scrlbars+',toolbar='+toolbar+',menubar='+menubar+',location='+location+',resizable='+resizable,false);
	return (false);
}

function reLoad(url) 
{
	window.opener.location.href=url;
	window.close();
	return (false);
}
/* Tracker# 8194 */
function openPopupWindowPrintable()
{
	help_window=window.open('', 'help_window','toolbar=no,location=top,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=718,height=470,left=40,top=90'); 
	help_window.focus();
}

//***********************************************************************************
//*
//*  openScrollablePopupWindow
//*  Opens a popup window using the specified url, and defining the width and height
//*  of the window
//*  Inputs:  var url - the url to open
//*           var width - the width of the window in pixels
//*           var height - the height of the window in pixels
//*  Output:  None
//*
//************************************************************************************	
function openScrollablePopupWindow(url, width, height)
{
	window.open(url, "", "width=" + width + ",height=" + height + ",top=20,left=20,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=no");
}