﻿// JScript File

function ClickMenuLogo()
{
    var str = window.location + "";
    str = str.toLowerCase();
    if( str.indexOf( "www.propertyhawk.co.uk" ) >= 0 )
        goto_url( "http://www.propertyhawk.co.uk" );        
    
    if( str.indexOf( "localhost" ) >= 0 )
        goto_url( "http://www.propertyhawk.co.uk" );        
}


function goto_url(loc) {
	window.location.href = loc;
}

function confirm_entry(text,destination){
	input_box=confirm(text);
	if (input_box==true){ 
		goto_url(destination); 
	}else{
		//alert ("You clicked cancel");
	}
}

function DllFill( id, array_name )
{
    var i, j, elt = document.getElementById( id );
    if( elt != null )
    {
        alert( elt.options.length );
        elt.options.length = 0;
        j = 0;
        for( i = 0; i < array_name.length - 1; i = i + 2 )
            elt.options[ j++ ] = new Option( array_name[i+1], array_name[i] );
        alert( elt.options.length );
    }
}


