// JavaScript Document var alllanguages=new Array('es','en','fr','it','pt','de'); function classifieds_comparestring(a,b) { return a.localeCompare(b); } function showhidesubmodules(container,show,form) { var i,div,a,submod,txtarea; submod=WAJAX_findObj('lh_submodule'); if(submod) { if(trim(form)!='') { submod.value=show; form=WAJAX_findObj(form); if(form) form.submit(); return; } for(i=0;i1) { if(s.options[1].value==-2) Begin=2; } var tmp=new Array(); for (var i=Begin; i' + '' + ' ' + ' ' + ' '+ '   '+ ' ' + ' ' + ' ' + ' ' + ' ' + '  ' + ' ' + ' ' + ''; div.style.height='auto'; div.style.visibility='visible'; div.style.overflow='visible'; } else if(type=='DB') { div.innerHTML='' + '' + '' + '' + '' + ' ' + '
' + '' + '
'; div.style.height='auto'; div.style.visibility='visible'; div.style.overflow='visible'; } else { div.style.height='1px'; div.style.visibility='hidden'; div.style.overflow='hidden'; } } } function addrowsselect(name,pre) { var table=WAJAX_findObj(pre+'table-' + name); var langobj=WAJAX_findObj(pre+'lang-'+name); var div,n,a; if(table && langobj) { var rows=table.rows.length-2; var tr = document.createElement("tr"); var j,td,obj,k,img; var arrclass=new Array('checkbox-normal','input-normal','input-normal'); for(j=0;j<3;j++) { td = document.createElement("td"); td.id=pre+'td-'+name+rows+'-'+j; td.vAlign='top'; obj=document.createElement("input"); if(j==0) obj.type="checkbox"; else obj.type="text"; obj.id=pre+'obj-'+name+rows+'-'+j; obj.name=pre+'obj-'+name+rows+'-'+j; if(j==0) obj.value=1; else obj.value=''; obj.className=arrclass[j]; if(j>0) obj.style.width='100px;'; td.appendChild(obj); if(j==2) { a=document.createElement('a'); a.href="javascript:openlanguages('"+pre+"div-"+name+"',"+rows+",'192px','auto');"; a.id=pre+'lnk-'+name+rows; a.name=pre+'lnk-'+name+rows; img=document.createElement('img'); img.border=0; img.id=pre+'flag-'+name+rows; img.name=pre+'flag-'+name+rows; img.src='themes/default/images/lng/'+langobj.value+'.gif'; a.appendChild(img); td.innerHTML+='  '; td.appendChild(a); div=document.createElement('div'); div.id=pre+'div-' + name + rows; div.className='box-content'; div.style.width='1px'; div.style.position='fixed'; div.style.overflow='hidden'; div.style.visibility='hidden'; n=alllanguages.length; for(k=0;k=0) { while(rows>=inicio) { sel=WAJAX_findObj(name+rows); if(sel) { th=WAJAX_findObj('col'+name+rows); if(th) th.removeChild(sel); } table.deleteRow(rows); rows-=1; } } } function openlanguages(div,cont,width,height) { var d=div; div=WAJAX_findObj(div+cont); if(div) { if(div.style.visibility=='visible') closelanguages(div.id); else { closeall(d); div.style.width=width; div.style.height=height; div.style.visibility='visible'; div.style.overflow='visible'; div.style.position='relative'; } } } function closeall(div) { var i=0; var obj=WAJAX_findObj(div+i); while(obj) { i+=1; closelanguages(obj.id); obj=WAJAX_findObj(div+i); } } function changeflag(lang) { var i=0; var obj=WAJAX_findObj('flag'+i); while(obj) { i+=1; obj.src='themes/default/images/lng/'+lang+'.gif'; obj=WAJAX_findObj('flag'+i); } } function changeflagname(name,lang) { var i=0; var obj=WAJAX_findObj(name+i); while(obj) { i+=1; obj.src='themes/default/images/lng/'+lang+'.gif'; obj=WAJAX_findObj(name+i); } } function closelanguages(div) { div=WAJAX_findObj(div); if(div) { div.style.width='1px'; div.style.height='1px'; div.style.overflow='hidden'; div.style.visibility='hidden'; div.style.position='fixed'; } } function changelanguageselects(div,newlng) { var pre='lh_'; var table=WAJAX_findObj(pre+'table-' + div); langobj=WAJAX_findObj(pre+'lang-'+div); var obj1,obj2,obj3,obj4,obj; if(langobj) { closeall(pre+'div-' + div); var i,j; for(i=0;i0) { var wfeatures=new WAJAX("wfeatures"); wfeatures.onLoad=function() { features.innerHTML=this.getText(); features.style.height='auto'; features.style.overflow='visible'; features.style.visibility='visible'; this.close(); } wfeatures.onError=function() { alert(this.error); } wfeatures.url="http://www.gruposooner.com/index.php?lh_module=classifieds.xmlfeatures&lh_idcategory=" + idcategory.value + "&lh_locations=" + location.value + "&lh_language=es"; wfeatures.divload='loadingfeatures'; wfeatures.dwidth="80px"; wfeatures.dheight="16px"; wfeatures.dato="lh_xml=1"; wfeatures.sendPost(); } else { features.innerHTML=''; features.style.height='1px'; features.style.overflow='hidden'; features.style.visibility='visible'; } } } function setattributes() { var attributes=WAJAX_findObj('lh_attributes'); var idcategory=WAJAX_findObj('lh_idcategory'); var location=WAJAX_findObj('lh_location'); if(attributes && idcategory && location) { if(idcategory.value>0) { var wattributes=new WAJAX("wattributes"); wattributes.onLoad=function() { attributes.innerHTML=this.getText(); attributes.style.height='auto'; attributes.style.overflow='visible'; attributes.style.visibility='visible'; this.close(); } wattributes.onError=function() { alert(this.error); } wattributes.url="http://www.gruposooner.com/index.php?lh_module=classifieds.xmlattributes&lh_idcategory=" + idcategory.value + "&lh_locations=" + location.value + "&lh_language=es"; wattributes.divload='loadingattributes'; wattributes.dwidth="80px"; wattributes.dheight="16px"; wattributes.dato="lh_xml=1"; wattributes.sendPost(); } else { attributes.innerHTML=''; attributes.style.height='1px'; attributes.style.overflow='hidden'; attributes.style.visibility='hidden'; } } } function setprices() { var prices=WAJAX_findObj('lh_prices'); var idcategory=WAJAX_findObj('lh_idcategory'); var location=WAJAX_findObj('lh_location'); if(prices && idcategory && location) { if(idcategory.value>0) { var wprices=new WAJAX("wprices"); wprices.onLoad=function() { prices.innerHTML=this.getText(); prices.style.height='auto'; prices.style.overflow='visible'; prices.style.visibility='visible'; this.close(); } wprices.onError=function() { alert(this.error); } wprices.url="http://www.gruposooner.com/index.php?lh_module=classifieds.xmlprices&lh_category=" + idcategory.value + "&lh_location=" + location.value + "&lh_language=es"; wprices.divload='loadingprices'; wprices.dwidth="80px"; wprices.dheight="16px"; wprices.dato="lh_xml=1"; wprices.sendPost(); } else { prices.innerHTML=''; prices.style.height='1px'; prices.style.overflow='hidden'; prices.style.visibility='hidden'; } } }