/* File in use on Jan 14 2001 09:03 
Everything works!!!  
Author:  Petrer Larson-Este - 
CopyRight: Bubblegum Productions Pty Ltd
Contact:  copyrights@bubblegum-productions.com
You can use and modify this script or parts of it provided you acknowledge original version authorship.
*/

var myWindow, newWindowName, newWindow,AnotherWindow,newLocationBuffer,newWindowRequired,newImageBuffer
newLocationBuffer = "";
newWindowRequired="N";
newImageBuffer = "";

function TellBrowser(){
 var browser="";
 //alert("This is the js file laser2.js");
  browser=navigator.appName;
  alert("Your browser is: " + browser);
}

function openNewWindow(newLocation){
 //-------------------------------------------------------------------------- level 1
 if (!myWindow || myWindow.closed){
 	myWindow = window.open(newLocation,"Sub_Window", "WIDTH = 200, HEIGHT=200, scrollbars, status, resizable");
    if(myWindow){
            newLocationBuffer = newLocation;  //saves the location of new window
            myWindow.focus();
    }
 }else{
	   // --------------------------------------------------------- level 2
	   if(newLocationBuffer == newLocation){
           myWindow.focus();
       }else{
	   	   myWindow.location.href=newLocation;
		   myWindow.focus();
	   }
       //--------------------------------------------------------- level 2
 }
 //---------------------------------------------------------------- level 1
}// funtion 



function evaluateRequestWindow(newLocation){
var newLocationFlag = newLocation.charAt(0);
var fileType = newLocation.substring(newLocation.length - 3);
var newLocationShort = newLocation.substring(1);
newWindowRequired='N';
 // Case:  New window required
 //------------------------------------------------------------------
  if(newLocationFlag == "N"){  // Flag = N  means new
   // Case:  Is Netscape
   //--------------------------------------------------------
      newWindowRequired='Y';
      if(navigator.appName == "Netscape"){
         //  case it is .pdf
	     //------------------------------------------------
	     if(fileType == "pdf"){
           window.location.href=newLocationShort;
         }else{ // Not pdf  and location is the sam
           openNewWindow(newLocationShort);
         }
	     //------------------------------------------------		 
	  }else{  // not Netscape but needs new window
	       openNewWindow(newLocationShort);
	  }
   //--------------------------------------------------------	  
  }else{ //does not require a new window
    window.location.href=newLocation;
  }
  //-----------------------------------------------------------------
}//function  

function ChangeLocation(field){
  
  var newLocation = field.options[field.selectedIndex].value;//URL
  var newLocationFlag = newLocation.charAt(0);// if N, request new window
  var fileType = newLocation.substring(newLocation.length - 3);// the 3 last characters
  var newLocationShort = newLocation.substring(1);//strips the first character, may be N
  newWindowRequired = 'N';
  if(newLocation != "dummy"){
   if(newLocationFlag == "N"){  // Flag = N  means new
     // Case:  Is Netscape
     //--------------------------------------------------------
      newWindowRequired='Y';
	  field.selectedIndex = 0; //resets the selecte to name of list
      if(navigator.appName == "Netscape"){
         //  case it is .pdf
	     //------------------------------------------------
	     if(fileType == "pdf"){
           window.location.href=newLocationShort;
         }else{ // Not pdf  and location is the sam
           openNewWindow(newLocationShort);
         }
	     //------------------------------------------------		 
	  }else{  // not Netscape but needs new window
	       openNewWindow(newLocationShort);
	  }
   //--------------------------------------------------------	  
   }else{ //does not require a new window
    field.selectedIndex = 0; //resets the selecte to name of list
	window.location.href=newLocation;
   }

  }
} //function


function openWindowProduct(ProductPage) {

 if (!AnotherWindow || AnotherWindow.closed){
    AnotherWindow = window.open(ProductPage,'', 'width = 400, height = 350, scrollbars, status, resizable');
    if(AnotherWindow){
	  newImageBuffer = ProductPage;   
      AnotherWindow.focus();
    } 
 }else {
    if(newImageBuffer == ProductPage){
		AnotherWindow.focus();
    }else{
	    AnotherWindow.location.href = ProductPage;
		newImageBuffer = ProductPage;
		AnotherWindow.focus();
	} 
 }	
} //fuknction


function Restore_dummy(field){
//To restore ... (dummy) to the selected option in the select list
// Make the option[0] the selected one
  //alert("this is Restore_dummy function");
  field.selectedIndex=0;
}
function doRollover(field){
//use this to change to orange
 field.style.color="cc6600";
}
function doMouseOut(field){
//use this to return to blue
  field.style.color="#003399";
}

function doRollover1(field){
//use this to change to clear blue
 field.style.color="#6699ff";
}
function doMouseOut1(field){
//use this to return to orange
  field.style.color="cc6600";
}
function doRollover2(field){
//use this to change to yellow
 field.style.color="ffcc66";
}
function doMouseOut2(field){
//use this to return to white
  field.style.color="#ffffff";
}
function doRollover3(field){
//use this to change to red
 field.style.color="663300";
}
function doMouseOut3(field){
//use this to return to brown
  field.style.color="#CC6600";
}

