//MENU ROLLOVER
if (document.images) {
nav1on   = new Image(); nav1on.src   = "_images/menu_homeon.gif";
nav1off  = new Image(); nav1off.src  = "_images/menu_home.gif";
nav2on   = new Image(); nav2on.src   = "_images/menu_updateson.gif";
nav2off  = new Image(); nav2off.src  = "_images/menu_updates.gif";
nav3on   = new Image(); nav3on.src   = "_images/menu_touron.gif";
nav3off  = new Image(); nav3off.src  = "_images/menu_tour.gif";
nav4on   = new Image(); nav4on.src   = "_images/menu_musicon.gif";
nav4off  = new Image(); nav4off.src  = "_images/menu_music.gif";
nav5on   = new Image(); nav5on.src   = "_images/menu_mediaon.gif";
nav5off  = new Image(); nav5off.src  = "_images/menu_media.gif";
nav6on   = new Image(); nav6on.src   = "_images/menu_abouton.gif";
nav6off  = new Image(); nav6off.src  = "_images/menu_about.gif";
nav7on   = new Image(); nav7on.src   = "_images/menu_storeon.gif";
nav7off  = new Image(); nav7off.src  = "_images/menu_store.gif";
nav8on   = new Image(); nav8on.src   = "_images/menu_myspaceon.gif";
nav8off  = new Image(); nav8off.src  = "_images/menu_myspace.gif";
nav9on   = new Image(); nav9on.src   = "_images/menu_facebookon.gif";
nav9off  = new Image(); nav9off.src  = "_images/menu_facebook.gif";
nav10on   = new Image(); nav10on.src   = "_images/menu_twitteron.gif";
nav10off  = new Image(); nav10off.src  = "_images/menu_twitter.gif";
}

function rollOn(img){
    if (document.images) {
        document[img].src=eval(img + "on.src");
    }
}

function rollOff(img){
    if (document.images) {
		document[img].src=eval(img + "off.src");
	}
}


//CLEAR FIELDfunction clearIt(field) {field.value="";}


// OPEN WINDOW
function openWin(url,name,popW,popH) {w = screen.availWidth;
h = screen.availHeight;leftPos = 5;
topPos = 5;window.open(url,name,'width='+popW+',height='+popH+',scrollbars=yes,toolbar=no,status=no,resizable=yes,top='+ topPos+',left='+leftPos);}

//AJAX
function Inint_AJAX() {try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IEtry { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IEtry { return new XMLHttpRequest();          } catch(e) {} //Native Javascriptalert("Your browser does not support HTTP Request");return null;};

function SignUp_Validate(form) {
if (form.U13.value !="") {
window.location.href = "http://ccc.sonymusic.com/checker/U13?siteID=741";
} else {var req = Inint_AJAX();
var thename = form.name.value;
var theemail = form.email.value;
var thezip = form.zip.value;
var thebmonth = form.bmonth.value;
var thebday = form.bday.value;
var thebyear = form.byear.value;
req.onreadystatechange = function () { if (req.readyState==4) {      if (req.status==200) {
	var response = req.responseText;
	if (response == 'Underage') {
	document.getElementById('errormsg').innerHTML= "<span class='error'>Thank you for your interest in registering. <br />As we are committed to protecting your privacy, we are unable to accept your registration.</span>";
window.location.href=window.location.href;

	} else if (response == 'No Errors') {
	SignUp_Process(form);
	} else {
	document.getElementById('errormsg').innerHTML=response; //return value;
	}      } }};

var fields = "name="+thename+"&email="+theemail+"&zip="+thezip+"&bday="+thebmonth+"-"+thebday+"-"+thebyear;req.open("POST", "process_signupvalidate.php", true);req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1");req.send(fields);
}};


function SignUp_Process(form) {var req = Inint_AJAX();
var thename = form.name.value;
var theemail = form.email.value;
var thezip = form.zip.value;
var thebmonth = form.bmonth.value;
var thebday = form.bday.value;
var thebyear = form.byear.value;
req.onreadystatechange = function () { if (req.readyState==4) {      if (req.status==200) {
	var response = req.responseText;
	document.getElementById('signup').innerHTML=response; //return value;      } }};

var fields = "name="+thename+"&email="+theemail+"&zip="+thezip+"&bday="+thebmonth+"-"+thebday+"-"+thebyear;req.open("POST", "process_signup.php", true);req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1");req.send(fields);};



function Comment_Validate(form) {
if (form.U13.value !="") {
window.location.href = "http://ccc.sonymusic.com/checker/U13?siteID=741";
} else {var req = Inint_AJAX();
var thename = form.name.value;
var theemail = form.email.value;
var thezip = form.zip.value;
var thebmonth = form.bmonth.value;
var thebday = form.bday.value;
var thebyear = form.byear.value;
var thecomment = form.comment.value;
var thecommentid = form.commentid.value;
req.onreadystatechange = function () { if (req.readyState==4) {      if (req.status==200) {
	var response = req.responseText;
	if (response == 'Underage') {
	document.getElementById('errormsg').innerHTML= "<span class='error'>Thank you for your interest in registering. <br />As we are committed to protecting your privacy, we are unable to accept your registration.</span>";
window.location.href=window.location.href;
	} else if (response == 'No Errors') {
	Comment_Process(form);
	} else {
	document.getElementById('errormsg').innerHTML=response; //return value;
	}      } }};

var fields = "name="+thename+"&email="+theemail+"&zip="+thezip+"&bday="+thebmonth+"-"+thebday+"-"+thebyear+"&comment="+thecomment+"&commentid="+thecommentid;req.open("POST", "process_commentvalidate.php", true);req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1");req.send(fields);
}};


function Comment_Process(form) {var req = Inint_AJAX();
var thename = form.name.value;
var theemail = form.email.value;
var thezip = form.zip.value;
var thebmonth = form.bmonth.value;
var thebday = form.bday.value;
var thebyear = form.byear.value;
var thecomment = form.comment.value;
var thecommentid = form.commentid.value;
req.onreadystatechange = function () { if (req.readyState==4) {      if (req.status==200) {
	var response = req.responseText;
	document.getElementById('thecomment').innerHTML=response; //return value;      } }};

var fields = "name="+thename+"&email="+theemail+"&zip="+thezip+"&bday="+thebmonth+"-"+thebday+"-"+thebyear+"&comment="+thecomment+"&commentid="+thecommentid;req.open("POST", "process_comment.php", true);req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1");req.send(fields);};
