var demosrc_forex_eur = "https://secure2.fxcorporate.com/fxtr/demo/?ib=FXCM_ITALY";

var demosrc_forex_usd = "https://secure2.fxcorporate.com/fxtr/demo/?ib=FXCM_ITALY";


function iframeLoad_forex_eur() {	 
    iframeLoad( demosrc_forex_eur );	 
}
function iframeLoad_forex_usd() {	 
    iframeLoad( demosrc_forex_usd );	 
} 

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 );
}		 
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;
} 





