var iframe1; function reloadAll(){ //alert("R1"); top.location.reload(); } function loadIframe(iframeName, url) { if (window.frames[iframeName]) { window.frames[iframeName].location = url; return false; } return true; } function ldIframe(iframeName, url) { frames[iframeName].location.href = url; // if (document.all.iframeName != null) { document.all.iframeName.src = url; //} } function getMyHref(){ var myHref = 'siteresults.php?generalsearch='+searchform.generalsearch.value+'&category='+searchform.category[searchform.category.selectedIndex].value+'&proptype='+searchform.proptype[searchform.proptype.selectedIndex].value+'&district='+searchform.district[searchform.district.selectedIndex].value+'&bedrooms='+searchform.bedrooms[searchform.bedrooms.selectedIndex].value+'&range1='+searchform.range1[searchform.range1.selectedIndex].text+'&range2='+searchform.range2[searchform.range2.selectedIndex].text+'&findit=1'; //alert(myHref); return myHref; } function getDetailsHref(is, gal) { var dLink = 'sitedetail.php?id='+id+'&pid='+gal; alert(dLink); return dLink; } function changeIframeSrc(id, url) { if (!document.getElementById) return; var el = document.getElementById(id); if (el && el.src) { el.src = url; return false; } return true; } function resizeLocalFrame(hSize){ if (document.getElementById('ifrm') != null) { document.getElementById('ifrm').style.height=hSize; } } function insertIt() { var y = document.getElementById("framediv"); var x = ''; iframe1 = window.frames["ifrm"]; if (window.frames["ifrm"].document == null) { ldIframe("ifrm",document.getElementById("ifrm").src); } x = window.frames["ifrm"].document.body.innerHTML; y.innerHTML = x; } function insertIt2() { var y = document.getElementById("framediv2"); var x = ''; if (window.frames["ifrm2"].document == null) { ldIframe("ifrm2",document.getElementById("ifrm2").src); } x = window.frames["ifrm2"].document.body.innerHTML; y.innerHTML = x; } function initEvents() { if (!HTMLAnchorElement.prototype.click) { HTMLAnchorElement.prototype.click = function() { var ev = document.createEvent('MouseEvents'); ev.initEvent('click',true,true); if (this.dispatchEvent(ev) !== false) { //safari will have already done this, but I'm not sniffing safari //just in case they might in the future fix it; I figure it's better //to trigger the action twice than risk not triggering it at all document.location.href = this.href; } } } } function triggerEv(el) { var ev = document.createEvent('MouseEvents'); ev.initEvent('click',true,true); if (el.dispatchEvent(ev) != false) { //safari will have already done this, but I'm not sniffing safari //just in case they might in the future fix it; I figure it's better //to trigger the action twice than risk not triggering it at all document.location.href = el.href; } } function fireMyEvent(targetId) { var target=document.getElementById(targetId); //alert(target); if(document.dispatchEvent) { // W3C / SAF / FF? var oEvent = document.createEvent("MouseEvents"); oEvent.initMouseEvent("click", true, true,window, 1, 1, 1, 1, 1, false, false, false, false, 0, target); target.dispatchEvent(oEvent); document.getElementById('ifrm').src = target.href; // this crap is to force the work in FF :( //target.click(); // alert('22'); // target.fireEvent(oEvent); // alert('23'); } else if(document.fireEvent) { // IE only //target.fireEvent("onclick"); //seems it doesnt work target.click(); } } function fireTopEvent(targetId) { var target=top.document.getElementById(targetId); //alert(target); if(top.document.dispatchEvent) { // W3C / SAF / FF? var oEvent = top.document.createEvent("MouseEvents"); oEvent.initMouseEvent("click", true, true,window, 1, 1, 1, 1, 1, false, false, false, false, 0, target); target.dispatchEvent(oEvent); //top.document.getElementById('ifrm').src = target.href; // this crap is to force the work in FF :( //target.click(); // alert('22'); // target.fireEvent(oEvent); // alert('23'); } else if(top.document.fireEvent) { // IE only //target.fireEvent("onclick"); //seems it doesnt work target.click(); } } function reloadIt(site,props) { if (props.search("10") >= 0) { //document.getElementById('dst10').click(); //this crap works only in IE //triggerEv(document.getElementById('dst10')); targetId = 'dst10'; fireMyEvent(targetId); } else if (props.search("11") >= 0) { //document.getElementById('dst11').click(); targetId = 'dst11'; fireMyEvent(targetId); } else if (props.search("12") >= 0) { //document.getElementById('dst12').click(); targetId = 'dst12'; fireMyEvent(targetId); } else if (props.search("16") >= 0) { //document.getElementById('dst16').click(); targetId = 'dst16'; fireMyEvent(targetId); } else if (props.search("17") >= 0) { //document.getElementById('dst17').click(); var targetId = 'dst17'; fireMyEvent(targetId); } } //var picp = document.getElementById("topbar"); // if (site != 'sitedetail' && site != 'siteresults') { // picp.src = 'images/'+site+'.jpg'; // picp.width = 580; // picp.height = 118; // } // else { // picp.width = 0; // picp.height = 0; // } //var y = document.getElementById("framediv"); // if (props != '') { // y.innerHTML = '\