if (top.frames.length!=0) top.location=self.document.location;

function OpenSURL(vURL) {
    var now=new Date();
    if (Math.floor && screen.width && screen.height && window.resizeTo && window.moveTo) {
        window.open(vURL,'SearchSite'+now.getTime(),'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,left=10,top=10,width='+Math.floor(screen.width*0.95)+',height='+Math.floor(screen.height*0.65));
    }
    else {
        window.open(vURL,'SearchSite'+now.getTime(),'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,left=10,top=10,width=760,height=550');
    }
}

// DPH 18102005 Function set image source on mousedown of overture link
function clk(vMyHref) {
    document.images['imgClk'].src = vMyHref;
    return true;
}   

function getRefToObject(objID) {
    if( document.layers ) {					//Netscape layers
        return document.layers[objID]; }
    if( document.getElementById ) {			//DOM; IE5, NS6, Mozilla, Opera
        return document.getElementById(objID); }
    if( document.all ) {					//Proprietary DOM; IE4
        return document.all[objID]; }
    if( document[objID] ) {					//Netscape alternative
        return document[objID]; }
    return false;
}



        
        
var clickAmount;
clickAmount = 0;

function trackClick() {
            
   clickAmount = clickAmount + 1;
           
   var x = readCookie('ukdrcl')
           
   var tmp = document.getElementById("div2").innerHTML
    tmp = tmp.replace('&amp;','&');
    tmp = tmp.replace('&amp;','&');
    tmp = tmp.replace('&amp;','&');
    tmp = tmp.replace('&amp;','&');
          
    //alert(tmp);
               
   if ((clickAmount == 1) && !(x) && (tmp.length > 20) ) {               
                            
      createCookie('ukdrcl','1',1);
              
      a = open(tmp,'maybe','width=950,height=800,toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
      a.blur();
      window.focus();
   }
           
}


function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}



function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}
