//the SSL site
var transactionURL = "https://services.au.vedaadvantage.com"
var transactionPort = ""//not needed if it is default port (:443)

//the standard http site
var nonTransactionURL = "http://services.au.vedaadvantage.com"
var nonTransactionPort = ""//not needed if it is default port (:80)

//the servlet path
var servletPath = "/dlw/servlet/DatalinkServlet2"
var evalString


function transactFrame(service, targetFrame)
{
    var myUser = top.myLongCasualUser || "";
    this.service = service;
    var noServletPath = "";
    var serviceStr = new String(this.service);
    if(serviceStr.indexOf("/dlw/servlet/DatalinkServlet2?nextService=")<0){
        noServletPath = "true";
    }else{noServletPath = "false";}
    if(noServletPath == "true"){
        
        	if(myUser=="")	{evalString = targetFrame + "location = " + "\'" + transactionURL + transactionPort + servletPath + "?nextService=" + service + "\'";}
    		else		{evalString = targetFrame + "location = " + "\'" + transactionURL + transactionPort + servletPath + "?nextService=" + service + "&INPUT_UserType="+ myUser + "\'";}
	
	}else{
        	if(myUser=="")	{evalString = targetFrame + "location = " + "\'" + transactionURL + transactionPort + service + "&INPUT_UserType="+ myUser + "\'";}
		else		{evalString = targetFrame + "location = " + "\'" + transactionURL + transactionPort + service + "\'";}    

	}
    eval(evalString)
}
function nonTransact(pagePath, targetFrame)
{
    this.pagePath = pagePath;
    var pagePathStr = new String(this.pagePath);
    var temp = (pagePathStr.indexOf("/dlw/servlet/DatalinkServlet2?nextService=")) ? false : true;
	(temp == true) ? (evalString = targetFrame + "location = " + "\'" + nonTransactionURL + nonTransactionPort + pagePath + "\'") : (evalString = targetFrame + "location = " + "\'" + nonTransactionURL + nonTransactionPort + servletPath + "?nextService=" + pagePath + "\'")
	eval(evalString)
}

function staticSecure(pagePath, targetFrame)
{
    var evalString = targetFrame + "location = " + "\'" + transactionURL + transactionPort + pagePath + "\'"
    eval(evalString)
}

function download(pagePath, targetFrame)
{
	evalString = targetFrame + "location = " + "\'" + nonTransactionURL + nonTransactionPort + pagePath + "\'"
    eval(evalString)
}

/*
added by Steve, hopefully temporarily, to change the logo in the top frameset.
yes, yes, it's a hack, but I did say temporarily
*/
var num
function setLogo(x){
    num = x;
    setTimeout("changeLogo()",1500);
}
function changeLogo(){
    if(num=="1"){
        top.frames["nav"].document.images[0].src = "/img/static/logo1.gif"
    }
    if(num=="2"){
        top.frames["nav"].document.images[0].src = "/img/static/smalllogo.gif"
    }
}
