
var demosrc_100k = "https://secure2.fxcorporate.com/fxtr/demo/?ib=fxcm_micro";  

var demosrc_uk = "https://secure2.fxcorporate.com/fxtr/demo/?ib=fxcmuk_micro";  
 
var demosrc_mini = "https://secure2.fxcorporate.com/fxtr/demo/?ib=fxcm_micro";   
 
function iframeLoad_100k() {	 
	iframeLoad( demosrc_100k );
}
function iframeLoad_mini() {	 
	iframeLoad( demosrc_mini );
}
function iframeLoad_uk() {	 
	iframeLoad( demosrc_uk );
}

function iframeLoad( name ) {   
		var demosrc = name;		  
		var theCookie = "";
		var theCookie2 = "";
		var theCookie3 = "";	
		var theDate = "";		 	 
		if ( window.document.cookie != null ) {
			theCookie = getMyCookie( "JSESSIONID" ); 
			if (CampaignString = getMyCookie("s_cpm"))
			{
			  eval("var CampaignArray = " + CampaignString);
			  var CurrentCampaign = CampaignArray[CampaignArray.length - 1][0];
			}
			theCookie2 = CurrentCampaign;
			theCookie3 = getMyCookie( "keyword" );
			theDate = getMyCookie( "tid" );			 	    
		} 
		if ( theCookie  == null ){
			theCookie = getCookie2( "jsessionid" );
		}	
		if ( theDate == null ) {
			theDate = getDate();
			if ( theCookie == null ) {
				theDate = theDate + "_" + Math.random()*100000000000000000;
			} else {
				theDate = theDate + "_" + theCookie;
			}		 
			createMyCookie( "tid", theDate, 365 );
		}		 
		hbx.hc1 = theDate;
		demosrc = demosrc + "&tid=" + theDate;
			 		 			 	 
		if ( theCookie2 != null ) {		
			demosrc = demosrc + "&cmp=" + theCookie2;
		}
		if ( refdomain != null ) {
			demosrc = demosrc + "&refdomain=" + refdomain;
		}
		if ( acctNum != null ) {
			demosrc = demosrc + "&acctNum=" + acctNum;
		}
		if ( theCookie3 != null ) {
			demosrc = demosrc + "&keyword=" + theCookie3;
		}
		//alert( demosrc );		 
		document.getElementById( "demo_reg" ).src = demosrc;		 
} 
function cutSFS( cookie ){
	var ret = cookie;	 
	if ( cookie.indexOf( "SFS-" ) > -1 ) {
		ret = ret.substring( 4 );	
	}	 	
	return ret;
} 
 
 

   
