var count = 0; var text = "    Red Sea Diving *  Dive Sharm El Sheikh  *  Dive Hurghada  *  Dive Dahab   **   Welcome to Divers International Web Site   **   The most updated Diving Web Site in the Red Sea   **   15% Discount for online booking   **   Red Sea Diving Sites Map    ***";


/* Navigation languages */

function langen() 
{ var goto = "http://www.diversintl.com/" + sitename + ".php";
  self.location.href = goto; }
function langde() 
{ var goto = "http://german.diversintl.com/" + sitename + ".php";
  self.location.href = goto; }
function langfr() 
{ var goto = "http://french.diversintl.com/" + sitename + ".php";
  self.location.href = goto; }
function langdu() 
{ var goto = "http://dutch.diversintl.com/" + sitename + ".php";
  self.location.href = goto; }



  function  scroll () {
    window.status = text.substring (count, text.length) + text.substring
(0, count)
    if (count < text.length)
      count ++;
    else
      count = 0;
    setTimeout ("scroll()", 150);
    }


// login.php page to log User In.
function loginn()
{
do {

		var x;
		x=forma.usernam.value;
		if((x.length==0) || (x.charAt(0)==' '))
		{
			alert(errorMsg0);
//			alert("put username");
			forma.usernam.value="";			
			forma.usernam.focus();
			return false;
			break;
		}

		var z;
		z=forma.passwrd.value;
		if((z.length==0) || (z.charAt(0)==' '))
		{
//			alert(errorMsg1);
			alert(errorMsg1);
			forma.passwrd.value="";
			forma.passwrd.focus(); 	
			return false;
			break;
		}

	} while(0)
}

// login.php page to send password by e-mail to user.
function sndpsw() {
		
	do
	{
		f=paswordo.emailo.value;
		if((f.length==0) || (f.charAt(0)==' '))
		{
			alert(errorMsg2);
			paswordo.emailo.value="";			
			paswordo.emailo.focus();
			return false;
		}

	} while(0)
}
function detailso(x,y){
	
		switch(x) {
			
			case 1:
			x = "tir";
			break;

			case 2:
			x = "loc";
			break;

			case 3:
			x = "ras";
			break;

			case 4:
			x = "gub";
			break;
		}

		moni=window.open('details_'+x+'.php','geo','width=693, height='+y+', status=0, scrollbars=0, left=16, top=30');
		moni.focus();

}

function detailso2(x,y,z){

		switch(x) {
			
			case 11:
			x = "tir_det";
			break;

			case 22:
			x = "loc_det";
			break;

			case 33:
			x = "ras_det";
			break;

			case 44:
			x = "gub_det";
			break;
		}

		moni=window.open('details_'+x+'.php?img='+y+'','geo2','width=750, height='+z+', status=0, scrollbars=0, left=50, top=110');
		moni.focus();

}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_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; }
}
