function ckAdvanceSearch(){
if(document.getElementById("qa").value==""){ alert("Masukkan kata pencarian"); return false; }
if(document.getElementById("qa").value.length<3){alert("Kata kunci terlalu sedikit"); return false;}
}
function chCatagory(url_link,id){
if (id.length==0){
document.getElementById("cbSubKategori").innerHTML="";
return;
}
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){
alert ("Your browser does not support AJAX!");
return;
}
var url="";
url=url_link+id;
xmlHttp.onreadystatechange=stateChangedCatagory;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
// state 4.. do it
function stateChangedCatagory() {
if (xmlHttp.readyState==4){
var inner = xmlHttp.responseText;
select_innerHTML(document.getElementById("cbSubKategori"),inner);
} else { document.getElementById("cbSubKategori").innerHTML=""; }
}
function GetXmlHttpObject(){
var xmlHttp=null;
try{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}catch (e){
// Internet Explorer
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
// use for combo
function select_innerHTML(objeto,innerHTML){
/******
* select_innerHTML - corrige o bug do InnerHTML em selects no IE
* Veja o problema em: http://support.microsoft.com/default.aspx?scid=kb;en-us;276228
* Version: 2.1 - 04/09/2007
* Autor: Micox - N�iron Jos� C. Guimar�es - micoxjcg@yahoo.com.br
* @objeto(tipo HTMLobject): o select a ser alterado
* @innerHTML(tipo string): o novo valor do innerHTML
*******/
objeto.innerHTML = ""
var selTemp = document.createElement("micoxselect")
var opt;
selTemp.id="micoxselect1"
document.body.appendChild(selTemp)
selTemp = document.getElementById("micoxselect1")
selTemp.style.display="none"
if(innerHTML.toLowerCase().indexOf("