function loadDefaultVal(){
    var searchTxt = document.getElementById("searchTxt");
    if(searchTxt.value == "Eg : Vasant Vihar,New Delhi")
      searchTxt.value = "";   
};

function refreshField(){
    var searchTxt = document.getElementById("searchTxt");
    searchTxt.style.backGroundColor="#FFFFFF";
};




function validatePcRequest(){
    showLoading();
    /*var lightbox  = document.getElementById("lightbox");
    var centerDiv = document.getElementById("centerDiv");
    centerDiv.innerHTML="";

    var height    = getWindowHeight()-10;
    var width     = getWindowWidth()-10;
    lightbox.style.position="absolute";
    lightbox.className="lightbox";
    lightbox.style.height=height+"px";
    lightbox.style.width=width+"px" ;
   
 
    centerDiv.style.position = "absolute";
    centerDiv.style.height   = (height/2.5)+"px";
    centerDiv.style.width    = (width/3) +"px";
    centerDiv.style.left     = (width/3)+"px";
    centerDiv.style.right    = (width/3)+"px";
    centerDiv.style.top      = (height/4)+"px";
    centerDiv.style.bottom   = (height/3)+"px";
    centerDiv.style.backgroundColor = "transparent";
    centerDiv.style.zIndex  = "2";
    centerDiv.style.margin  = "0 auto";
    centerDiv.innerHTML     = "<img src='image/loading.gif' style='padding-top:"+((height/2.5)/2-30)+"px;padding-left:"+((width/3)/2-30)+"px' ></img>";

    lightbox.style.display  = "block";
    centerDiv.style.display = "block";
  */
    var searchTxt = document.getElementById("searchTxt");   
    if(searchTxt.value == ""){
       searchTxt.focus();
       return false;
    }

    var pc = new PCAction();
    var paramArr = new Array();
    paramArr.push("controller/myInterface.php?q=pcPoint&loc=");
    paramArr.push(searchTxt.value);
    paramArr.push("&from=");
    paramArr.push(from);
    var requestURL = paramArr.join("");
    paramArr = null;
    mRequestXHTTP(requestURL, pc.onSearch,"xml",false, pc);
    return false;
};

function loadPcList(){
    var state = document.getElementById("state");
    if(state.value == ""){
        state.focus();
        return false;
    }


    var pc = new PCAction();
    var requestURL = "controller/myInterface.php?q=pcState&state="+state.value;
    mRequestXHTTP(requestURL, pc.loadPcList,"xml",false, pc);
};

function validateChoosePcForm(form){
    var state = form.state;
    if(state.value  == "") {
        alert("Please select your state name");
        state.focus();
        return false;
    }
    var pcdetail    = form.pcdetail;
    if(pcdetail.value  == "") {
        alert("Please select your state name");
        pcdetail.focus();
        return false;
    }

    var addr     = form.addr;
    var option   = document.createElement('option');
	option.value = addr.value;
	option.appendChild(document.createTextNode(addr.value));
	pcdetail.appendChild(option);
  
}

function selectedPcInfo(){   
   var pcdetail    = document.getElementById('pcdetail');
   if(pcdetail.value  == "") {
        alert("Please select your state name");
        pcdetail.focus();
        return false;
    }
  
   if(pcdetail.value != ""){
       var sampleVa = pcdetail.value;
       document.getElementById("")
       var mulVal   = new Array();
       mulVal       = sampleVa.split("|");
       var temp_no  = mulVal[0];
       var lat      = mulVal[1];
       var lon      = mulVal[2];
       var addr     = mulVal[3];

       document.forms.chooseMyPc.latitude.value=lat;
	   document.forms.chooseMyPc.longitude.value=lon;
	   document.forms.chooseMyPc.addr.value=addr;
	   document.forms.chooseMyPc.pc_no.value=temp_no;

   }	
};






















