function homeContentLoad(pageid, id) { var url = 'http://www.nuconrad.com//ajax/home_content.php?id='+pageid; new Ajax.Request( url, { onCreate: function(transport) { }, onComplete: function(transport) { if(id == 'other-content') { //$('content-section').style.height = "auto"; //$('content-div').style.height = "auto"; //$('content').style.height = "auto"; } else if(id == 'home-middle-content') { slideShow.initailizeSlide(); } else if(id == 'scroll-contaner') { slideShow1.initailizeSlide(); } if(id == 'other-content') { correctTimerDivHeight() } }, onSuccess: function(transport) { if(id == 'other-content') { $('mtv-feed-content').hide(); $('flash-content').hide(); $(id).show(); //$('content-section').style.height = "auto"; //$('content-div').style.height = "auto"; //$('content').style.height = "auto"; } else if(id == 'home-middle-content') { slideShow.initailizeSlide(); } else if(id == 'scroll-contaner') { slideShow1.initailizeSlide(); } $(id).update(transport.responseText); if(id == 'other-content') { correctTimerDivHeight() } } } ); } function homeContentLoad2(pageid, id) { var url = 'http://www.nuconrad.com//ajax/home_content2.php?id='+pageid; new Ajax.Request( url, { onCreate: function(transport) { }, onComplete: function(transport) { if(id == 'other-content') { } else if(id == 'home-middle-content') { slideShow.initailizeSlide(); } else if(id == 'scroll-contaner') { slideShow1.initailizeSlide(); } if(id == 'other-content') { //correctTimerDivHeight() } }, onSuccess: function(transport) { if(id == 'other-content') { //$('mtv-feed-content').hide(); //$('flash-content').hide(); $(id).show(); //$('content-section').style.height = "auto"; //$('content-div').style.height = "auto"; //$('content').style.height = "auto"; } else if(id == 'home-middle-content') { slideShow.initailizeSlide(); } else if(id == 'scroll-contaner') { slideShow1.initailizeSlide(); } $(id).update(transport.responseText); if(id == 'other-content') { //correctTimerDivHeight() } } } ); } function showEvents(){ $('newsContentBox').hide(); $('eventsContentBox').show(); $('nwN').removeClassName("newsActive"); $('nwE').addClassName("newsActive"); } function showNewsWidget(){ $('newsContentBox').show(); $('eventsContentBox').hide(); $('nwN').addClassName("newsActive"); $('nwE').removeClassName("newsActive"); } function showFA(){ $('taFA').addClassName("artActive"); $('taTA').removeClassName("artActive"); } function showTA(){ $('taTA').addClassName("artActive"); $('taFA').removeClassName("artActive"); } function clearInput(inputID){ document.getElementById(inputID).value = ''; } function resetInput(inputID, value){ if(document.getElementById(inputID).value == ''){ document.getElementById(inputID).value = value; } } function signUp() { var url = 'http://www.nuconrad.com/ajax/sign_up.php'; new Ajax.Request(url, { parameters: $('sign-up').serialize(true), onFailure: function(transport) { result = transport.responseText.split("!~`divider`~!"); $('popup-signup-error').show(); $('popup-signup-error').update(result[0]); no_errors = parseInt(result[1]); h = 450 + no_errors * 30; $('signup-cont').scrollTop = 0; //reg_popup2.options.dimensionH = parseInt(h); //reg_popup2.scroll_to_postition(); }, onSuccess: function(transport) { $('user_id').value = transport.responseText; reg_popup2.hide(); reg_popup3.show(); } } ); } function login() { var url = 'http://www.nuconrad.com/ajax/login.php'; new Ajax.Request(url, { parameters: $('form_login1').serialize(true), onFailure: function(transport) { result = transport.responseText.split("!~`divider`~!"); $('popup-login-error').show(); $('popup-login-error').update(result[0]); no_errors = parseInt(result[1]); reg_popup6.options.dimensionH = parseInt( 176 + no_errors * 30 ); reg_popup6.scroll_to_postition(); }, onSuccess: function(transport) { $('first_register').value = 0; reg_popup6.hide(); if($('logged_in')) { $('logged_in').value = 1; } showArtistPlayed(); } } ); } function checkVerfication() { var url = 'http://www.nuconrad.com/ajax/sign_up.php'; new Ajax.Request(url, { parameters: $('verification-check').serialize(true), onFailure: function(transport) { result = transport.responseText.split("!~`divider`~!"); $('popup-verification-error').show(); $('popup-verification-error').update(result[0]); no_errors = parseInt(result[1]); reg_popup3.options.dimensionH = parseInt( 430 + no_errors * 30 ); reg_popup3.scroll_to_postition(); }, onSuccess: function(transport) { result = transport.responseText.split("!~`divider`~!"); if($('noschool').checked) { window.location = 'http://www.nuconrad.com//friends/facebook/index.php'; return false; } showArtistPlayed(); } } ); } function showArtistPlayed() { if($('promocode-flag') && $('promocode-flag').value == 1) { showProducts(); return false; } var url = 'http://www.nuconrad.com/ajax/artist_played.php'; new Ajax.Request( url, { onSuccess: function(transport) { $('artist_played').update(transport.responseText); reg_popup3.hide(); reg_popup4.show(); } } ); } function showSchoolRanking() { var url = 'http://www.nuconrad.com/ajax/school_standing.php'; new Ajax.Request( url, { onSuccess: function(transport) { $('school-container').update(transport.responseText); reg_popup4.hide(); reg_popup5.show(); } } ); } function showNews() { $('content-section').style.height = "auto"; $('content-div').style.height = "auto"; $('content').style.height = "auto"; $('mtv-feed-content').show(); $('other-content').hide(); $('flash-content').hide(); correctDivHeight(); } function showFlash() { $('content-section').style.height = "auto"; $('content-div').style.height = "auto"; $('content').style.height = "auto"; $('mtv-feed-content').hide(); $('other-content').hide(); $('flash-content').show(); correctDivHeight(); } function selectOtherSchool() { if(document.sign_up.school.options[document.sign_up.school.selectedIndex].text == 'Other' && ($('noschool').checked != true || $('noschool').value == 'off')) { $('other_school_section').show(); } else { $('other_school_section').hide(); } } function goLastStep() { if($('first_register').value == 1) { document.location.href='http://www.nuconrad.com/friends/facebook/index.php'; } else { document.location.href='http://www.nuconrad.com/profile/fan.php'; } } function showProducts() { $('promocode-flag').value = 0; var url = 'http://www.nuconrad.com/ajax/products.php'; new Ajax.Request( url, { onSuccess: function(transport) { $('product-container').update(transport.responseText); reg_popup3.hide(); reg_popup8.show(); } } ); } function showProducts1() { $('product-next').hide(); $('product-cancel').show(); var url = 'http://www.nuconrad.com/ajax/products.php'; new Ajax.Request( url, { onSuccess: function(transport) { $('product-container').update(transport.responseText); reg_popup8.show(); } } ); } function checkPromocode() { var url = 'http://www.nuconrad.com/ajax/login.php'; new Ajax.Request(url, { parameters: $('promocode-check').serialize(true), onFailure: function(transport) { result = transport.responseText.split("!~`divider`~!"); $('popup-promocode-error').show(); $('popup-promocode-error').update(result[0]); no_errors = parseInt(result[1]); reg_popup7.options.dimensionH = parseInt( 290 + no_errors * 30 ); reg_popup7.scroll_to_postition(); }, onSuccess: function(transport) { $('promocode-flag').value = 1; if($('logged_in').value == 0) { reg_popup7.hide(); reg_popup2.show(); $('product-next').show(); $('product-cancel').hide(); $('first_register').value = 0; } else { reg_popup7.hide(); $('product-next').hide(); $('product-cancel').show(); showProducts(); } } } ); }