// js functions support
//var agt=navigator.userAgent.toLowerCase();
//var isNN = (navigator.appName.indexOf("Netscape")!=-1);
//var isIE = (navigator.appName.indexOf("Explorer")!=-1);
//var isMac = (agt.indexOf("mac") != -1);

//browser detect
var app = navigator.appVersion;
var agt=navigator.userAgent; 
var d = document;
var n = navigator.appName;

DOM = (d.getElementById) ? true : false;
NS4 = (d.layers) ? true : false;
IE = (d.all) ? true : false;
Mac = (app.indexOf("Mac") != -1);
isAOL  = (agt.indexOf("Aol") != -1); 
isOP =(agt.indexOf('Opera') != -1);
NS = (n.indexOf("Netscape")!=-1);

if (app.charAt(0) == "5") {
	var isNav6 = "";
    if (n == "Netscape") {
            isNav6 = true;
	} 
}
NS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
IEDTD = (IE && document.doctype) ? document.doctype.name.indexOf(".dtd")!=-1 : false;
IEnoDTD = IE && !IEDTD;  

IE4 = IE && !DOM;
IE4M = IE4 && Mac;  
IE5M = IE && Mac;
IE5W = IE && !Mac;
AOL = isAOL && IE;
NSM = (NS) && Mac;
NSW = (NS) && !Mac;
isNS = NSM || NSW;
// ends browser detect 

var previewWindow;
function popWindow(URL, width, height, top, left, toolbar, scrollbar,resizable)
{		
	var winFeatures;
	if(isNS)
	{
		width = width;
		height = height;
	}
	else
	{
		width = width + 20;
		height = height + 8;
	}
	if((resizable != "") && (resizable != null) && (resizable != 'no'))
	{
		resizable = 'resizable';		
	}
	else if(resizable != 'no')
	{
		resizable = 'resizable';		
	}
	else {
		resizale = '';		
	}	
	winFeatures = "width="+width+","+"height="+height+",top="+top+",left="+left+",toolbar="+toolbar+",scrollbars="+scrollbar+ ",status=no,"+resizable;
	previewWindow = window.open(URL, "myWindow" , winFeatures);
	previewWindow.focus();	
}

/*********MOUSEOVER, MOUSEOUT FUNCTION************
*<td width="19%"><a href="javascript:popUp('magazines.php')" onmouseover="buttonover('magazine', 'images/magazine_on.jpg')" onmouseout="buttonout('magazine', 'images/magazine_off.jpg')"><img src="images/magazine_off.jpg" width="100" height="100" border="0" name="magazine" alt="Magazines"></a></td>
*/
function buttonover(buttonname, imgsrc)
{
	if (document.images) 
	{
		document[buttonname].src = imgsrc;
    	}
}
function buttonout ( buttonname, imgsrc )
{
  	if (document.images) 
  	{
  		document[buttonname].src = imgsrc;
    	}
}
/*********END MOUSEOVER, MOUSEOUT FUNCTION************/
