 function elem(id)
 {
 return document.getElementById(id);
 }  
function show(id)
 {
 elem(id).style.display = "";
 }

 function hide(id)
{
 elem(id).style.display = "none";
 }  
function Modify()
 {
 hide("Ejare_details"); hide("Rahn_details"); hide("Kharid_details"); 
 var typeOrder= GetBox("Generall_type").value;
 if (typeOrder == 1 || typeOrder == 3) show("Rahn_details");
 if (typeOrder == 2 || typeOrder == 3) show("Ejare_details");
 if (typeOrder == 4)
{
 show("Kharid_details");

}
 }
function Change_display(id){
	if (elem(id).style.display == "none") show(id);
	else if ( elem(id).style.display == "") hide(id);
}
		function SelectCity(SelectedCity){
			elem("city").selectedIndex.value = "SelectedCity";
		}
		      function SelectOptionInList( lstSelectList, intID )
      {
            try
            {
                  var intIndex = 0;
                  // Loop through all the options
                  lstSelectList = elem(lstSelectList);
                  for( intIndex = 0; intIndex < lstSelectList.options.length; intIndex++ )
                  {
                        // Is this the ID we are looking for?
                        if( lstSelectList.options[intIndex].value == intID )
                        {
                              // Select it
                              lstSelectList.selectedIndex = intIndex;
                              // Yes, so stop searching
                              break;
                        }
                  }
            }
            catch( expError )
            {
                  alert( "ClientUtilities1.js::SelectOptionInList( ).\n" +
                              "Error:" + expError.number + ", " + expError.description );
            }
            
      }
      function GetBox($Id){
      
      
      	if (document.getElementById) {  // DOM3 = IE5, NS6
		var Box = document.getElementById($Id);
	}else{
		if (document.layers) {  // Netscape 4
			var Box = document.$Id;
		}else{  // IE 4
			var Box = document.all.$Id;
		}
	}
	return Box;
      }