if ((navigator.appVersion.indexOf('Mac')!= -1)){ // Mac adjust
	document.write('<link href="mac.css" rel="stylesheet" type="text/css">');
}

function changeImages() {

     if (document.images && (preloadFlag == true)) {

          for (var i=0; i<changeImages.arguments.length; i+=2) {

               document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
          }
     }
}

function newImage(ovrSrc) {

     if (document.images) {
          img = new Image();
          img.src = ovrSrc;
          return img;
     }
}

var preloadFlag = false;

function preloadImages() {

     if (document.images) {
		products_o = "images/products_o.gif";
		about_o = "images/about_o.gif";
		contact_o = "images/contact_o.gif";
		go_o = "images/go_o.gif";
		back_o = "images/back_o.gif";
		pdf_o = "images/pdf_o.gif";
						
		preloadFlag = true;
	}
}

var newWindow = null;

function closeWin() {
	if (newWindow != null) {
		if(!newWindow.closed)
			newWindow.close();
	}
}

function newWin(url, type, strWidth, strHeight) {
	
	closeWin();
	
	if (type == "fullScreen") {
		strWidth = screen.availWidth - 10;
		strHeight = screen.availHeight - 160;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
	if (type == "menu") tools = "resizable=yes,toolbar=no,location=no,menubar=yes,scrollbars=yes,width="+strWidth+",height="+strHeight+",left=0,top=0";
	if (type == "console") tools = "resizable=no,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;



