<!--
var ua = navigator.userAgent.toLowerCase();
var OS = null;
var browser,version,total,thestring;

if (checkIt('konqueror')) {
    browser = "konqueror";
    OS = "linux";
}
else if (checkIt('safari')) {
    browser = "safari"
    OS = "mac";
}
else if (checkIt('omniweb')) browser = "omniweb"
else if (checkIt('opera')) browser = "opera"
else if (checkIt('webtv')) browser = "webtv";
else if (checkIt('icab')) browser = "icab"
else if (checkIt('msie')) browser = "internet explorer"
else if (!checkIt('compatible')) {
    // what? 
    browser = "netscape navigator"
    version = ua.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = ua.charAt(place + thestring.length);

if (null==OS) {
    if (checkIt('linux')) OS = "linux";
    else if (checkIt('x11')) OS = "unix";
    else if (checkIt('mac')) OS = "mac"
    else if (checkIt('win')) OS = "windows"
    else OS = null;
}

function checkIt(string) {
    place = ua.indexOf(string.toLowerCase()) + 1;
    thestring = string;
    return place;
}

// set for unix
if ( OS == "unix" || OS == "linux") {
    document.write('<link rel="stylesheet" href="css/sun_solaris.css" type="text/css" />');
// this makes no sense. is this the default for all other operating systems?
} else if ((version < 4 || null==OS) && !(browser.toLowerCase() == "safari")) {
    document.write('<link rel="stylesheet" href="css/sun_bigger.css" type="text/css" />');
} else if (browser == "webtv") {
    document.write('<link rel="stylesheet" href="css/sun_webtv.css" type="text/css" />');
} else {
    document.write('<link rel="stylesheet" href="css/default.css" type="text/css" />');
}





function infoOpen(path) {
    javaWindow = window.open('/en/explore/info/'+path+'','info','width=265,height=315');
}

function infoClose(loc) {
    partnerWindow=window.open(loc,'partner');
    self.close();
}


function acceptConditions() {
	checkNum();
	var handsetMessage = "";
	var numMessage = "";
	
	if (document.forms.buyGame.handset.selectedIndex == "0"){
		handsetMessage = "Please ensure that you have chosen a Sprint handset. \n\n";
	}
	if (document.forms.buyGame.validNum.value == "0") {
		numMessage = "Please ensure that you have included your wireless phone number with area code. \nIt should be in the format 8885551212, without dashes or spaces.";
	}
	if (document.forms.buyGame.validNum.value == "1" && document.forms.buyGame.handset.selectedIndex != "0" ){
		if (document.forms.buyGame.disclaimerRead.value == "yes") {
			document.forms.buyGame.submit();
		} else {
            javaWindow=window.open('/en/connection/sorrent/disclaimer.jsp','disclaimer','toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=470,height=600');
		}
	} else {
		if (document.forms.buyGame.handset.selectedIndex == "0" || document.forms.buyGame.validNum.value == "0"){
			alert(handsetMessage + numMessage + '\n')
		}
	}
}


function checkNum() {
	var phoneNum = document.forms.buyGame.phoneNumber.value;
	var valid = 1
	var GoodChars = "0123456789"
	var i = 0

	if (phoneNum.length != 10) {
		valid = 0
	}
	for (i =0; i <= phoneNum.length -1; i++) {
		if (GoodChars.indexOf(phoneNum.charAt(i)) == -1 ) {
			valid = 0
		} 
	} 

	if (valid == 1) {
		document.forms.buyGame.validNum.value = "1";
	} else {
		document.forms.buyGame.validNum.value = "0";
	}
}


function acceptSubmit() {
	opener.document.forms.buyGame.disclaimerRead.value = "yes";
	opener.document.forms.buyGame.submit();
	window.close();
	opener.window.focus();
}
  
function declineSubmit() {
	opener.document.forms.buyGame.disclaimerRead.value = "no";
	window.close();
	opener.window.focus();
}





//end -->
