// JavaScript Document
//========================================================================================================//


var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie4 = (document.all)? true:false;
var ie5 = false;
// Microsoft Stupidity Check
if (ie4) {
	if((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) {ie5 = true;}
	if(ns6){ns6=false;}
}
//========================================================================================================//
//========================================================================================================//
function normalWindow(pageURL, winName, settings){
		conditions = "toolbar=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,top=0,left=0,";//can use 
		conditions += settings;//settings will store arg of width and height
		newWin = window.open(pageURL, winName, conditions);//open the window
		newWin.focus();//set the focus to the window
}
//========================================================================================================//
function newWindow(pageURL, winName, settings){
	var newWin, conditions, w, h;
	if((ie4)||(ie5)&&(window.showModelessDialog)){
		w=settings.substring(6,settings.indexOf(",")); h=settings.substring(settings.lastIndexOf("=")+1,settings.length);
		newWin = window.showModelessDialog(pageURL ,window, "dialogHeight:"+h+"px; dialogWidth:"+w+"px; scroll:no; center:yes; help:no; resizable:no; status:no; unadorned:yes");// dialogLeft:20px; dialogTop:20px;
	}else{
		conditions = "toolbar=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,top=0,left=0,";//can use 
		conditions += settings;//settings will store arg of width and height
		newWin = window.open(pageURL, winName, conditions);//open the window
		newWin.focus();//set the focus to the window
	}
}//end window function

