<!-- dds landing script -->

function setDDSSAcookie(host) { 
var domain = document.location.hostname.replace(/^[^.]+(.*)$/,"$1");	document.cookie = "DDSSA_"+(host!=null&&host.length>0?host:"")+"=oneX; domain="+domain+"; path=/"; }

function setDDSSAcookieOld(host) { document.cookie = "DDSSA_"+(host!=null&&host.length>0?host:"")+"=oneX; domain=dfw.ibm.com; path=/"; }

function setDDSSAcookie2(host,hours) { var domain = document.location.hostname.replace(/^[^.]+(.*)$/,"$1"); var now = new Date(); var later = new Date(now.getTime()+(1000 * 60 * 60 * hours)); document.cookie = "DDSSA_"+(host!=null&&host.length>0?host:"")+"=oneX; domain="+domain+"; expires="+later.toGMTString()+"; path=/"; }

function setDDSSAcookie2Old(host,hours) { 
  	var now = new Date();
  	var later = new Date(now.getTime()+(1000 * 60 * 60 * hours))
	document.cookie = "DDSSA_"+(host!=null&&host.length>0?host:"")+"=oneX; domain=dfw.ibm.com; expires="+later.toGMTString()+"; path=/";	
}

function getReturnURL() {
	
	var beg = -1; 
	var end = -1;
	var host = "";
	var request = "";
	
	end  = location.pathname.substring(1).indexOf("/");	
	if(end != -1)
		host = location.pathname.substring(1,end+1);
	
	beg = location.search.indexOf("DDSPageRequest=");
	if(beg != -1)
	{
		end = location.search.substring(beg).indexOf("&DDSPageQuery");
		if(end != -1)
			request = location.search.substring(beg+15,end+1)+"?"+location.search.substring(end+15)
		else
			request = location.search.substring(beg+15);
	}
	
	if(host.length > 0)
		return "http://"+host+".dfw.ibm.com"+request;
	else
		return "";

}

function sa_onclick() { }
