function openScrollingWin(strFile, strName, intWidth, intHeight)
{
    var strProperties = 'toolbar=no,width=' + Math.round(intWidth) + ',height=' + Math.round(intHeight) + ',left=30,top=150,' + 'status=yes,scrollbars=yes,resizable=yes,menubar=no';
    tmpWin = window.open(strFile, strName, strProperties);
    tmpWin.focus();
}

function openDemoWin()
{
    var intWidth=960; var intHeight=520; var strName="CFDsDemo";
    //var strFile="http://demo.marketdatasystems.com/prospects4/controller?action=demo_account&processId=demo&webSiteId=sha&locale=en_ZA&noqas&bhcp=1";
    var strFile="https://demo.marketdatasystems.com/prospects4/controller?action=display_demo&processId=demo2&webSiteId=sha&locale=en_ZA&wl=true&secure=true&bhcp=1";
    var strProperties = 'toolbar=no,width=' + Math.round(intWidth) + ',height=' + Math.round(intHeight) + ',left=30,top=150,' + 'status=yes,scrollbars=yes,resizable=yes,menubar=no';
    tmpWin = window.open(strFile, strName, strProperties);
    tmpWin.focus();
}


function confirm_delete(type,item_name,item_id,parent)
{
	if(type=="nav1")
    {
        var msg = "Are you sure you want to delete the '"+item_name+"' menu item AND it\'s sub-menu items?";
        var link = "navigation.php?l=1&delete="+item_id;
    }
    
    else if(type=="nav2")
    {
        var msg = "Are you sure you want to delete the '"+item_name+"' sub-menu item?";
        var link = "navigation.php?l=2&p="+parent+"&delete="+item_id;
    }
    
    else if(type=="page")
    {
        var msg = "Are you sure you want to delete the '"+item_name+"' page?";
        var link = "pages.php?delete="+item_id;
    }
    
    else if(type=="section")
    {
        var msg = "Are you sure you want to delete the '"+item_name+"' section?";
        var link = "sections.php?delete="+item_id;
    }
    
    else if(type=="emailtext")
    {
        var msg = "Are you sure you want to delete the '"+item_name+"' template?";
        var link = "emailtext.php?delete="+item_id;
    }
    
    var answer = confirm(msg)
	
    if (answer)
    {
		//window.location = "/admin/"+link;
        window.location = link;
	}

}

function subButton()
{
    if(document.getElementById("risk").checked==true && document.getElementById("agree").checked==true)
    {
        document.getElementById("submit").disabled=false;
    }
    else document.getElementById("submit").disabled=true;
}

function subButton2()
{
    if(document.getElementById("l2").checked==true)
    {
        document.getElementById("submit").disabled=false;
    }
    else document.getElementById("submit").disabled=true;
}


function callMe()
{
    document.getElementById('callMeArea').style.display="block";
    document.getElementById('callMeArea').innerHTML="<iframe src='/callme.php' frameborder='0' width='100%' height='100%'></iframe>";
    document.getElementById('callMeButton').style.display="none";
}
    
function callMeButton()
{
    document.write("<div id='callMeButton'><a href='javascript:callMe()'><img src='/images/callmeback.jpg' border='0' /></a></div><div id='callMeArea' style='display:none;border:1px solid #ccc;width:300px;height:280px;'></div>");
}

    

    
    
