//<script>
function addtofavorites()
{ 
	var favoriteurl="http://www.infotel.co.uk"; 
	var favoritetitle="Infotel, UK and International hotels"; 

	if ((navigator.appVersion.indexOf("MSIE")>0)&&(parseInt(navigator.appVersion)>=4)) 
	{ 
		window.external.AddFavorite(favoriteurl,favoritetitle); 
	}
	else
	{
		alert("Sorry, this function only works in Internet Explorer. Netscape navigator users: click the 'bookmarks' icon on your browsers toolbar, then select 'add bookmark'")
	}
}

var counter = 0;
function open_poppy(url,x,y)
{
	if(screen.width)
	{
		var winl = (screen.width-x)/2;
		var wint = (screen.height-y)/4;
	}
	else
	{
		winl = 0;wint =0;
	}

	if (navigator.appName == "Netscape")
	{
		poppy = "win" + counter;
		var poppy_win = window.open(url, poppy,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=" + x + ",height=" + y + ",left=" + winl + ",top=" + wint + "");
		poppy_win.focus();
	}
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		counter++;
		poppy = "win" + counter;
		var poppy_win = window.open(url, poppy,"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=" + x + ",height=" + y + ",left=" + winl + ",top=" + wint + "");
	}
}

function preloadImages() 
{ 
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swapImgRestore() 
{
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function findObj(n, d) 
{ 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function swapImage() 
{ 
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showHideLayers() 
{
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function changeProp(objName,x,theProp,theValue) 
{ 
  var obj = findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function checkBrowser(URL) 
{
	v3 = 0; op = 0; ie4  = 0; ie5 = 0; nn4 = 0; nn6 = 0; isMac = 0; aol = 0;

	if(document.images)
	{
    		if(navigator.userAgent.indexOf("Opera") != -1)
		{
			op = 1;
		} 
		else 
		{
			if(navigator.userAgent.indexOf("AOL") != -1)
			{
				aol = 1;
        		}
			else
			{
				ie4 = (document.all && !document.getElementById);
				nn4 = (document.layers);
				ie5 = (document.all && document.getElementById);
				nn6 = (document.addEventListener);
			}
		}
	} 
	else 
	{
    		v3 = 1;	
	}

	if(navigator.userAgent.indexOf("Mac") != -1)
	{
		isMac = 1;
	}

	if(op)
	{ // do this
    		//alert("You are using Opera");
	} 

	if(ie4)
	{ // do this
    		//alert("You are using Internet Explorer 4");
	}
 
	if(ie5)
	{ // do this
		//alert("You are using Internet Explorer 5 or higher");
	} 

	if(nn4)
	{ // do this
		window.location=unescape(URL); document.returnValue=false;
	} 

	if(nn6)
	{ // do this
    		//alert("You are using Netscape 6");
	} 

	if(aol)
	{ // do this
		//alert("You are using an AOL browser");
	}

	if(v3)
	{ // do this
		//alert("You are using a pre version 4 browser");
	}
	
}

function jumpMenu(targ,selObj,restore)
{ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}  
     
