﻿ (function(){var menu,userAgent=navigator.userAgent.toLowerCase(),opera=/opera/.test(userAgent),onLoad=function(){var name="main_menu";var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){if(divs[i].className==name){menu=divs[i];var lis=menu.getElementsByTagName("li");for(var n=lis[0];n;n=n.nextSibling)if(n.tagName=="LI"){n.ajxtop=true;if(opera)n.style.width=n.offsetWidth-(n.className.indexOf("tlast")==-1? 3:0);}for(var j=0;j<lis.length;j++){lis[j].className=lis[j].className;lis[j].style.position="static";var uls=lis[j].getElementsByTagName("ul");if(uls.length>0)uls[0].style.display="none";lis[j].shown=lis[j].show=false;lis[j].onmouseover=function(){clearTimeout(menu.timer);if(this.className.indexOf("ajxover")==-1)this.className+=" ajxover";this.show=true;menu.timer=setTimeout(update,160);};lis[j].onmouseout=function(){clearTimeout(menu.timer);if(!this.shown)this.className=this.className.replace(new RegExp(" ?ajxover\\b"), "");this.show=false;menu.timer=setTimeout(update,600);};}}}},update=function(){var lis=menu.getElementsByTagName("li");for(var i=lis.length-1;i>=0;i--){if(lis[i].show){if(!lis[i].shown){if(!lis[i].parentNode.style.filter){var uls=lis[i].getElementsByTagName("ul");if(uls.length>0){lis[i].style.position="relative";uls[0].style.filter="alpha(opacity=0)";uls[0].style.opacity=0;uls[0].style.display="block";fadeIn(uls[0]);lis[i].shown=true;}}else setTimeout(update,13);}}else{var uls=lis[i].getElementsByTagName("ul");if(uls.length>0){uls[0].style.display="none";lis[i].style.position="static";lis[i].shown=false;if(lis[i].className.indexOf("ajxover")!=-1)lis[i].className=lis[i].className.replace(new RegExp(" ?ajxover\\b"), "");}}}},fadeIn=function(o){o.tstart=new Date;if(!o.timer)o.timer=setInterval(function(){var s=(new Date-o.tstart)/200;if(s<1){var v=s;o.style.filter="alpha(opacity="+v*100+")";o.style.opacity=v;}else{clearInterval(o.timer);o.timer=undefined;o.style.filter="";o.style.opacity=1;}}, 13);},addOnReady=function(f,fu){var isReady=false,ready=function(){if(!isReady){isReady=true;f();};};if(document.addEventListener){document.addEventListener('DOMContentLoaded',ready,false);window.addEventListener("load",ready,false);window.addEventListener("unload",fu,false);}if(window.attachEvent)window.attachEvent("onload",ready);if(document.documentElement.doScroll&&window==top){(function(){if(!isReady){try{document.documentElement.doScroll("left");}catch(E){setTimeout(arguments.callee,0);return;}ready();}})()}};addOnReady(onLoad, onLoad);})();
 
function openDemo(urlStr) {
    if (urlStr=="") {
	    alert("Please select an account");
		return false;		
	  }
	 else { 
	    document.location.replace(urlStr);   
      }
  
   }

function openwebsitesurvey(){
 					lnk="website_survey.asp"
					var win=window.open(lnk,"","width=600,height=570,toolbars=0,scrollbars=1,resizable=no")
					}	 
					
					
document.write('<script language="JavaScript" type="text/javascript" src="http://livewebhelp.info:9090/webchat/jivelive.jsp"></script>');
document.write('<script language="Javascript" src="http://gd.geobytes.com/gd?after=-1&variables=GeobytesCity,GeobytesCountry,GeobytesRegion"></script>');

function dbStoreAjax()
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  
var url="../webpages/livehelp_page_hits_ajax.asp";
url=url+"?pagename="+document.location.href+"&ajaxcountry="+document.getElementById('cyreserve').value+"&ajaxstate="+document.getElementById('rgreserve').value+"&ajaxcity="+document.getElementById('ctreserve').value;
 
xmlHttp.open("post",url,true);
xmlHttp.send(null);
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("<tr>");
document.write("<td width='37%' align='left' valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>                  <tr>                    <td height='16' align='center' valign='middle'>&nbsp;</td>                  </tr>                  <tr>                    <td align='center' height='63' valign='middle'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='90' height='56'>                      <param name='movie' value='../webimages/swf/koford_logo.swf' />                      <param name='quality' value='high' />                      <embed src='../webimages/swf/koford_logo.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='90' height='56'></embed>                    </object></td>                  </tr>                  <tr>                    <td align='center' valign='middle'><a href='../index.html' title='Online  Forex, CFD & Metal Trading - Kerford Investments (UK) Ltd'><img src='../webimages/kerfordlogo_text.gif' width='298' height='30' border='0' /></a></td>                  </tr>                </table></td>");
document.write("<td width='42%' align='right' valign='top'>");

document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("<tr>");
document.write("<td align='right'>&nbsp;</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td height='27' align='right'><img src='../webimages/social_media_icons.jpg' width='130' height='24' border='0' usemap='#social_network' />");
document.write("<map name='social_network' id='social_network'>");
document.write("<area shape='rect' coords='76,-1,102,25' href='http://www.facebook.com/pages/Kerford-Investments-UK-Ltd/266902993372136' target='_blank' title='follow us on Facebook'  /><area shape='rect' coords='104,0,128,29' href='http://twitter.com/kerford_uk' target='_blank' title='follow us on Twitter' />");
document.write("</map></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td align='right'><a href='javascript:openwebsitesurvey()' title='Take our Website Survey'><img src='../webimages/take_our_websitesurvey.jpg' alt='Take our Website Survey' width='211' height='36' border='0' /></a></td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");
document.write("<td width='21%' align='left' valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>");


document.write("<tr>");
document.write("<td align='center' valign='bottom'><div class='helpdesk'><a href='mailto:support@kerford.co.uk'>Help Desk</a></div></td>");
document.write("</tr>");
document.write("<form id='frmSearch' name='frmSearch' method='post' action='search.asp'>");
document.write("<tr>");
document.write("<td align='center' valign='middle'>");
document.write("<input type='hidden' value='AND' name='boolean' />");
document.write("<input type='hidden' name='selSearchWhere' />");
document.write("<input type='text' name='terms' id='terms' class='search' value='search query' onfocus='if (this.value==\"search query\") this.value=\"\" ' onblur='if (this.value==\"\") this.value=\"search query\"' style='border:#FFA832 1px solid; width:90px;color:#666666' />");
document.write("&nbsp;<input type='submit' name='btnSubmit' class='go' value='GO'   /></td>");
document.write("</tr>");
document.write("</form>");				
                   

document.write("<tr>");
document.write("<td height='4' align='left' valign='top'></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td align='center' valign='top' height='15'>");
document.write('<select name="selLanguage" id="selLanguage" size="1" onchange="openDemo(this.value)" style="font-size: 11px; font-family: Verdana,Tahoma,Arial; width:135px; background-color:#F9AC3F; border:#F9AC3F 1px solid; color:#ffffff; height:15px; "  class="language_field">');

document.write('<option selected="selected">Login</option>');
document.write('<option value="">------------</option>');
document.write('<option value="http://www.kerford.co.uk/webpages/account_types.htm">Open an Account</option>');
document.write('<option value="http://www.kerford.co.uk/webpages/demo.htm">Register Demo</option>');
document.write('<option value="">------------</option>');
document.write('<option value="http://demo.fxtradesoft.com/FXTRADESOFT/tradingterminal/Admin/KERFORDUKloginlive.asp">Login Demo</option>');
document.write('<option value="http://online.kerford.co.uk/tradingterminal/admin/loginlive.asp">Login Live</option>');
document.write('</select>');			   
document.write("</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td height='5' align='left' valign='top'></td>");
document.write("</tr>");

document.write("<tr>");
document.write("<td height='20' align='center' valign='bottom'><select  name='selLanguage' id='selLanguage' size='1' onchange='openInOtherLanguage(this.value)'  style='font-size: 11px; font-family: Verdana,Tahoma,Arial;width:135px; background-color:#F9AC3F; border:#F9AC3F 1px solid; color:#ffffff; '  >");
document.write("<option selected='selected'>Language</option>");
document.write("<option>------------</option>");
document.write("<option value='http://www.kerford.co.uk/'>English</option>");
document.write('<option value="http://arabic.kerford.co.uk/">العربية(Arabic)</option>');
document.write('<option value="http://chinese.kerford.co.uk/">中國 (Chinese)</option>');
document.write('<option value="http://spanish.kerford.co.uk/">Español(Spanish)</option>');
document.write("</select></td>");
document.write("</tr>");
document.write("</table></td>");
document.write("</tr>");
document.write("</table>");

function openInOtherLanguage(urlStr) {
    if (urlStr=="") {
	    alert("Please select the language");
		return false;		
	  }
	 else { 
	    document.location.replace(urlStr);   
      }
  }



