

function swapLogo ()
{
	document.getElementById("logoContainer").innerHTML = '<a href="http://au.playstation.com"  onclick="offsite(\'DCS.dcssip\', \'eu.playstation.com\',\'DCS.dcsuri\',\'default\',\'WT.ti\',\'game/clickthruEU\')" title="Playstation" target="_blank"><img style="border:0px" src="images/playstation_au.jpg" id="psLink" /></a>';
}


function setEULogo()
{
	document.getElementById("logoContainer").innerHTML = '<a href="http://eu.playstation.com" onclick="offsite(\'DCS.dcssip\', \'eu.playstation.com\',\'DCS.dcsuri\',\'default\',\'WT.ti\',\'game/clickthruEU\')" title="Playstation" target="_blank"><img style="border:0px" src="images/playstation_eu.jpg" id="psLink" /></a>';
}

function setAULogo()
{
	document.getElementById("logoContainer").innerHTML = '<a href="http://au.playstation.com" onclick="offsite(\'DCS.dcssip\', \'au.playstation.com\',\'DCS.dcsuri\',\'default\',\'WT.ti\',\'game/clickthruAU\')" title="Playstation" target="_blank"><img style="border:0px" src="images/playstation_au.jpg" id="psLink" /></a>';
}

function setSocialCopy(Copy)
{
	
	document.getElementById("FooterCopy").innerHTML = '<a href="embed.txt" target="_Blank">' + Copy + '</a>';
}

function configurePage(Mode,Copy)
{
	Copy = URLDecode(Copy);
	if(Mode.toString().toLocaleUpperCase() == "AU")
	{
		document.getElementById("logoContainer").innerHTML = '<a href="http://au.playstation.com" onclick="offsite(\'DCS.dcssip\', \'au.playstation.com\',\'DCS.dcsuri\',\'default\',\'WT.ti\',\'game/clickthruAU\')" title="Playstation" target="_blank"><img style="border:0px" src="images/playstation_au.jpg" id="psLink" /></a>';
	}
	else
	{
		document.getElementById("logoContainer").innerHTML = '<a href="http://eu.playstation.com" onclick="offsite(\'DCS.dcssip\', \'eu.playstation.com\',\'DCS.dcsuri\',\'default\',\'WT.ti\',\'game/clickthruEU\')" title="Playstation" target="_blank"><img style="border:0px" src="images/playstation_eu.jpg" id="psLink" /></a>';
	}
	document.getElementById("FooterCopy").innerHTML = '<a href="embed.txt" target="_Blank">' + Copy + '</a>';
}

function URLDecode(utftext) 
{
	var browser=navigator.appName;
	
	if(browser.search("Netscape") != -1)
	{
		return utftext;
	}
	
    var string = "";
    var i = 0;
    var c = c1 = c2 = 0;
    
    while ( i < utftext.length ) 
    {
        c = utftext.charCodeAt(i);

        if (c < 128) 
        {
            string += String.fromCharCode(c);
            i++;
        }
        else if((c > 191) && (c < 224)) 
        {
            c2 = utftext.charCodeAt(i+1);
            string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
            i += 2;
        }
        else 
        {
            c2 = utftext.charCodeAt(i+1);
            c3 = utftext.charCodeAt(i+2);
            string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
            i += 3;
        }
    }
    return string;
}