";
showMore(callObj,moreTemplate,sX,sY,wid,curIndx);
}
function searchForm(searchTag,myJSON){
//get all forms
//validate firmst
var validateStr=searchTag+'formValidate()';
retVal=true;
try{
var retVal=eval(validateStr);
}catch(e){}
if(retVal==false){return false;}
var path="//web.har.com/widget/api.cfm";
var frmObj=document.getElementById(searchTag+"form");
if(typeof frmObj == undefined){alert('Widget was not configured right. Please contact support@har.com to resolve this issue.');return;}
var topDocObj=myParent(frmObj);
var pObj=topDocObj.childNodes[0];
thisTab=topDocObj.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[1];
var thisForm=pObj.childNodes[1].childNodes[0].childNodes[0];
var thisTitle=pObj.childNodes[0].childNodes[0].childNodes[0].childNodes[2];
var thisResult=pObj.childNodes[1].childNodes[0].childNodes[1];
var dwid=thisResult.id.substr(9);
var thisLoad=pObj.childNodes[1].childNodes[0].childNodes[2];
thisLoad.style.display='block';
thisResult.innerHTML="
Please Wait....
";
var params=getFormParam(frmObj)+"for="+searchTag+"&cid="+eval("cid"+dwid)+"&sitetype="+eval("sitetype"+dwid);
params=params.substr(1,params.length);
if(myJSON==undefined){
var request=path+"?"+params+"&searchform="+searchTag;
var head = document.getElementsByTagName("head").item(0);
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.setAttribute("src", request);
head.appendChild(script);
}else{
processJS(myJSON,thisForm,thisResult,thisTab,thisLoad,thisTitle);
}
}
function moreinfo(tobj,sw,moreinfo){if(sw==1){var pPos=findPos(tobj);var popDiv=document.createElement("div");popDiv.style.position="absolute";popDiv.setAttribute('id','showmoreinfo');popDiv.style.top=getY(tobj);popDiv.style.left=pPos[0];popDiv.style.width=400;popDiv.style.background="red";popDiv.innerHTML=moreinfo;document.body.appendChild(popDiv);}else{removeWho("showmoreinfo"); }}
function createDiv(pObj,cname){var nDiv=document.createElement("div");nDiv.className=cname;pObj.appendChild(nDiv);return nDiv;}
function showMore(callObj,shtml,sX,sY,tid,cIndex){if(eval('lastClickcindex'+tid)!=-1){closeTip(tid,eval('lastClickcindex'+tid));}eval("lastClickcindex"+tid+"=cIndex");var demoObj=document.getElementById("demotip"+tid);var closeBut="";demoObj.innerHTML=closeBut+shtml;demoObj.style.top=sY+"px";demoObj.style.display='block';}
function closeTip(iid,cid){document.getElementById("demotip"+iid).style.display='none';document.getElementById(cid+"Item"+iid).className='pRows';}
function removeWho(who) {if(typeof who== 'string') {who=document.getElementById(who);}if(who && who.parentNode){who.parentNode.removeChild(who);}}
function fixTip(tid){var demoTip=document.getElementById("demotip"+tid); if(demoTip.style.display!=''){window.status=demoTip.scrollTop ;}}
function getY( oElement ){var iReturnValue = 0;while( oElement != null ) {iReturnValue += oElement.offsetTop;oElement = oElement.offsetParent;}return iReturnValue;}
function findPos(obj) {var curleft = curtop = 0;if (obj.offsetParent){curleft = obj.offsetLeft;curtop = obj.offsetTop;while (obj = obj.offsetParent) {curleft += obj.offsetLeft;curtop += obj.offsetTop;}}return [curleft,curtop];}
function showSearch(wid){document.getElementById('demotip'+wid).style.display='none';document.getElementById('titleBar'+wid).innerHTML='';document.getElementById('harresult'+wid).style.display='none';document.getElementById('hartab'+wid).style.display='none';document.getElementById('harwidget'+wid).style.display='block';}
function dateOver(tObj,isover,dformat){if(isover && tObj.value==dformat){tObj.value='';}if(!isover && tObj.value==""){tObj.value=dformat;}}
function getFormParam(obj) { var getstr = "?";for (i=0; i0){chosen=chosen.substring(0,chosen.length-1);}getstr+=chosen+"&";}}return getstr;}
function myParent(meObj){var curObj=meObj;while(true){if(curObj.parentNode!=undefined){if(curObj.id=="widgetOuter"){isfound=true;return curObj;break;}curObj=curObj.parentNode;}}}
function getHTTP(){var xmlhttp=null;if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}else if (window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}return xmlhttp;}