function blockError(){return true;}
window.onerror = blockError;
function Pop(url,windowname,w,h,t,l,s){
window.open(url,windowname,'resizable=no,toolbar=no,scrollbars='+s+',menubar=no,status=no,directories=no,width='+w+',height='+h+',left='+l+',top='+t+'');
}
function ImgPop(img,alt) {
var look='resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width=820,height=700,left=50,top=50'
popwin=window.open("","",look)
popwin.document.open()
popwin.document.write('<html>')
popwin.document.write('<head>')
popwin.document.write('<title>'+alt+' - ROPUK NETWORK - Investment Property Professionals</title>')
popwin.document.write('<link rel="StyleSheet" href="css/main.css" type="text/css">')
popwin.document.write('</head>')
popwin.document.write('<body background="../picts/agent-background.jpg" oncontextmenu="return false">')
popwin.document.write('<center>')
popwin.document.write('<img src="'+img+'" alt="'+alt+'"><br>')
popwin.document.write('<table width="90%"><tr><td align="center"><span style="font-size: 8pt">Whilst every care has been taken to produce accurate images of the properties, they are artists\' impressions only. They do not form part of the Contract of Sale and are not admissible as a representation of the finished product in the event of a dispute.</span></td></tr></table><br>')
popwin.document.write('<input type="button" value="Close Window" onclick="javascript:window.close()" onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button">')
popwin.document.write('</center>')
popwin.document.write('<script type="text/javascript"> 
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script> 
<script type="text/javascript"> 
try {
var pageTracker = _gat._getTracker("UA-329644-7");
pageTracker._trackPageview();
} catch(err) {}</script> 
</body>')
popwin.document.write('</html>')
popwin.document.close()
}
function formCheck() {
if (document.frmcontact.contact_name.value=="") {
alert("You have not entered your Contact Name. Please ensure this field is completed and try again.");
return false;
}
if (document.frmcontact.contact_name.value==" ") {
alert("You have not entered your Contact Name. Please ensure this field is completed and try again.");
return false;
}
if (document.frmcontact.email.value=="") {
alert("You have not entered your Email. Please ensure this field is completed and try again.");
return false;
}
if (document.frmcontact.email.value!=document.frmcontact.email_confirm.value) {
alert("You have not entered a matching Email. Please ensure these fields match and try again.");
return false;
}
document.frmcontact.submit()
return true;
}
function preloader()
{
     // counter
     var i = 0;

     // create object
     imageObj = new Image();

     // set image list
     images = new Array();
     images[0]="../../images/glossyback.png"
     images[1]="../../images/glossyback2.png"
     images[2]="../../images/tab_left_c.gif"
     images[3]="../../images/tab_bg_c.gif"

     // start preloading
     for(i=0; i<=3; i++)
     {
        imageObj.src=images[i];
     }

}
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

// This function is for stripping leading and trailing spaces - added 24-09-08 ml
function trimSpaces(str)
{
        if (str != null)
        {
                var i;

                for (i=0; i < str.length; i++)
                {
                        if (str.charAt(i)!=" ")
                {
                                str=str.substring(i,str.length);
                                break;
                        }
                }

                for (i = str.length-1; i >= 0; i--)
                {
                        if (str.charAt(i)!=" ")
                {
                                str = str.substring(0,i+1);
                                break;
                        }
                }

                if (str.charAt(0)==" ")
                {
                        return "";
                }
                else
                {
                        return str;
                }
        }
}

function validateForm(newsletter)
        {
            // strips leading and trailing spaces - added 24-09-08 ml
            for (i=0; i < document.form.elements.length; i++)
            {
                document.form.elements[i].value = trimSpaces(document.form.elements[i].value);
            }
            // Now do field validation

            if(document.forms.newsletter.name.value=="")
            {
            alert("Please enter your full name.");
            return false;
            }

            if(document.forms.newsletter.email.value=="")
            {
            alert("Please enter your email address.");
            return false;
            }

            if(document.forms.newsletter.terms.value=="")
            {
            alert("Please accept the terms.");
            return false;
            }

      }

function validateForm(buyer_request)
        {
            // strips leading and trailing spaces - added 24-09-08 ml
            for (i=0; i < document.form.elements.length; i++)
            {
                document.form.elements[i].value = trimSpaces(document.form.elements[i].value);
            }
            // Now do field validation

            if(document.forms.buyer_request.contact_name.value=="")
                {
                    alert("Please enter your full name.");
                    return false;
                }

            if(document.forms.buyer_request.email.value=="")
                {
                    alert("Please enter your email address.");
                    return false;
                }
            if(document.forms.buyer_request.email_confirm.value=="")
                {
                    alert("Please confirm your email address.");
                    return false;
                }
            if(document.forms.buyer_request.details_questions.value=="")
                {
                    alert("Please enter details of your enquiry.");
                    return false;
                }

      }

preloads = "../../images/lt_div_120_b.gif,../../images/lt_div_120.gif,../../images/glossyback.png,../../images/glossyback2.png".split(",")
var tempImg = []

for(var x=0;x<preloads.length;x++) {
    tempImg[x] = new Image()
    tempImg[x].src = preloads[x]
}

