<!--
<!--
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
//-->
function openAWindow(theURL,winname,features)
{
  var newWin = window.open("http://planetdomain.com/vendercom/" + theURL,winname,features);
  newWin.focus();
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_showHideLayers() { //v3.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; }
}


function trimString(inString)
{
	var outString;
	var startPos;
	var endPos;
	var ch;

	// where do we start?
	startPos = 0;
	ch = inString.charAt(startPos);
	while ((ch == " ") || (ch == "\b") || (ch == "\f") || (ch == "\n") || (ch == "\r") || (ch == "\n")) {
		startPos++;
		ch = inString.charAt(startPos);
	}

	// where do we end?
	endPos = inString.length - 1;
	ch = inString.charAt(endPos);
	while ((ch == " ") || (ch == "\b") || (ch == "\f") || (ch == "\n") || (ch == "\r") || (ch == "\n")) {
		endPos--;
		ch = inString.charAt(endPos);
	}

	// get the string
	outString = inString.substring(startPos, endPos + 1);

	return outString;
}


function isChar(charValue)
{

 if ( ((charValue>="a")&&(charValue <="z")) || ((charValue >="A")&&(charValue <="Z")))
    return true;
 else
    return false; 
 
}


function isNum(numValue)
{

 if ((numValue >="0") && (numValue <="9"))
    return true;
 else
    return false; 
 
}

function isHyphen(Value)
{

 if (Value=="-")
   return true;

 else
    return false; 
 
}





function isValidName(nameValue)
 {
   var str = trimString(nameValue);
   var j;
   var ch;
   

 
   	for(i=0;i<str.length;i++)
	{
     
	  ch = str.substring(i, i + 1);
	 // alert(isChar(ch)+ "   " + isNum(ch) + "   " + isHyphen(ch) )
	 
      if (!((isChar(ch) || isNum(ch)) || isHyphen(ch)))
       {
	   alert("Domain Name Can Only Have Alpha-Numeric Values Or A Hyphen(-)");
	   return false;
       }  
		
	 }
	 


	 
   if((str.substring(0,1)=="-") || (str.substring(str.length-1,str.length)=="-"))
    { alert("Domain Name Can Not Start Or End With  A Hyphen (-)");
	 return false;
    }
		 
 
  return true;
 } 



function isValidDomainName(nameValue)
 {
  var i;


	nameValue=trimString(nameValue);

 
//check for empty domain name
  if(nameValue == "")
   {
    alert("Please Enter A Domain Name To Search");
	return false;
    }
	
 //check for length of domain name
  if(nameValue.length < 1 || nameValue.length > 63)
   {
    alert("\tYou Entered '" + nameValue +"' As A Choice. \n Please Enter 3 to 63 Characters For Domain Name");
    return false; 
    }
  
  if(!(isValidName(nameValue)))
   {
    return false;
    }
	
	

 return true;
	
  }

  
  
function lookupDomain( )
{
 var flag;
 flag=true;
bb = document.lookup.menu.value;
  with ( document.lookup )
  {
      for ( ref = 0; ref < elements[ "num.domains" ].value; ref++ )
      {
        
			 {
			   if (isValidDomainName(elements[ "temp.domain.name." + ref ].value))
			   {
				 elements[ "domain.name." + ref ].value = elements[ "temp.domain.name." + ref ].value + ".com";
				

                  if (bb=="com au") 
				  
				  {
 
	document.location.href="comau1.jsp?airportCode=" +  elements[ "temp.domain.name." + ref ].value + "&num.domains=1"+"&srs.sessionid=null"+"&srs.action=domain.lookup";
				}
		
				 if (bb=="co uk") {

	document.location.href="countrycodes.jsp?airportCode=" +  elements[ "temp.domain.name." + ref ].value + "&num.domains=1"+"&srs.sessionid=null"+"&srs.action=domain.lookup";
				
				}
				
				 if (bb=="info") {

	document.location.href="info.jsp?airportCode=" +  elements[ "temp.domain.name." + ref ].value ;
				
				}
			
				
				 if (bb=="us") {

	document.location.href="us.jsp?airportCode=" +  elements[ "temp.domain.name." + ref ].value ;
				
				//alert("Its a US!");
				}
							
				 if (bb=="biz") {

	//document.location.href="biz.jsp?airportCode=" +  elements[ "temp.domain.name." + ref ].value ;
				//alert("Its a biz!");
				
				}
				
				else if (bb!="com au" && bb!="info" && bb!="us" && bb!="co uk"){
  

 submit(); 
				 return true;

   } 
				
			   else 
			    flag=false; 	 
				return false;
			  } 
			
		
	
		
		
		
		//	else
		//	 {alert("The Domain Name Should Not Contain '.'s");
		//	  flag=false;
		//	  }
		
      }
	 
     
   }
}

}
   function showHideLayer( layer )
   {
      if (( obj = MM_findObj( layer )) != null ) 
      { 
         if ( obj.style ) 
         { 
            if ( obj.style.visibility == 'hidden' )
            {
               document.currOpener.src = '/media/images/up.gif';
               obj.style.visibility = 'visible'; 
            }
            else
            {
               document.currOpener.src = '/media/images/down.gif';
               obj.style.visibility = 'hidden'; 
            }
         }
      }
   }