// Tell A Friend JAVASCRIPT 

function openWin(location,winName,features) {
window.open(location,winName,features);
}

/* END of Tell A Friend JAVASCRIPT FUNCTION  


   Popup code for get in touch 
*/

var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}

function popUpWin(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 == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}


/* End of Popup code for get in touch

  Tell A Friend Javascript 
*/

function openWin(location,winName,features) {
window.open(location,winName,features);
}
// End of Tell A Friend 


/********************************************************
 * Copyright (C) 2002-2003, CodeHouse.com. All rights reserved.
 * CodeHouse(TM) is a registered trademark.
 *
 * THIS SOURCE CODE MAY BE USED FREELY PROVIDED THAT
 * IT IS NOT MODIFIED OR DISTRIBUTED, AND IT IS USED
 * ON A PUBLICLY ACCESSIBLE INTERNET WEB SITE.
 * 
 * CodeHouse.com JavaScript Library Module: Browser Sniffer Class
 * You can obtain this script at http://www.codehouse.com
 ********************************************************/
 
 function CJL_BrowserSniffer()
{
   var ua = navigator.userAgent;

   this.isOpera = function()
   {
      return /Opera/.test(ua);
   }

   this.isSafari = function()
   {
      return /Safari/.test(ua);
   }

   this.isGecko = function()
   {
      return navigator.product == "Gecko" &&
	     ! ( this.isOpera() || this.isSafari() );
   }

   this.isIEWin = function()
   {
      return window.external && /Win/.test(ua);
   }

   this.isIEMac = function()
   {
      return window.external && /Mac/.test(ua);
   }

   this.getVersion = function()
   {
      if( this.isIEWin() || this.isIEMac() )
      {
         return Number(ua.match(/MSIE ([0-9.]+)/)[1]);
      }
      else if( this.isSafari() )
      {
         return Number(ua.match(/[0-9.]+$/));
      }
      else if( this.isGecko() )
      {
         var n = ua.match(/rv:([0-9.]+)/)[1];

         var ar = n.split(".");

         var s = ar[0] + ".";

         for(var i = 1; i < ar.length; ++i)
         {
            s += ("0" + ar[i]).match(/.{2}$/)[0];
         }

         return Number(s);
      }
      else if( this.isOpera() )
      {
         return Number(ua.match(/Opera.([0-9.]+)/)[1]);
      }
      else
      {
         return null;
      }
   }
}
   
   sniffer = new CJL_BrowserSniffer();

   if( sniffer.isIEWin() )
   {
      browserType = "Internet Explorer for Windows";
   }
   else if( sniffer.isIEMac() )
   {
      browserType = "Internet Explorer for Macintosh";
   }
   else if( sniffer.isSafari() )
   {
      browserType = "Safari"
   }
   else if( sniffer.isGecko() )
   {
      browserType = "Gecko family";
   }
   else if( sniffer.isOpera() )
   {
      browserType = "Opera";
   }
   else
   {
      browserType = "Unknown";
   }
   
   // end of Browser Sniffer script
