for (i=0;i<urls.length;i++) {	if (referrer.match(urls[i])) {		chec = urls[i];	}}if (chec != "") {	$.cookie("school", chec, {expires: 7});}$(document).ready(function() {	var ww = $.cookie("school");	if (!ww) {		$("#custentity_sc_student_id").parent().parent().parent().css("display","none");		$("#custentity_sc_school").parent().parent().parent().css("display","none");	} else {		for(i=0;i<urls.length;i++) {			if (urls[i] == ww) {				$("#custentity_sc_school option[value='" + i + "']").attr('selected', 'selected');			}		}		$("#custentity_sc_school").attr("disabled","disabled");	}});function setCookie(c_name, value, expiredays) {	var exdate = new Date();	exdate.setDate(exdate.getDate()+expiredays);	document.cookie=c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());}function getCookie(Name) {  var search = Name + "="  var returnvalue = "";  if (document.cookie.length > 0) {    offset = document.cookie.indexOf(search)    // if cookie exists    if (offset != -1) {       offset += search.length      // set index of beginning of value      end = document.cookie.indexOf(";", offset);      // set index of end of cookie value      if (end == -1) end = document.cookie.length;      returnvalue=unescape(document.cookie.substring(offset, end))      }   }  return returnvalue;}function recordingBanners() {	var recordingAds = new Array();	recordingAds[0] = '<a href="/apifreelunch" id="homeRecording"><img src="/site/v3images/ban_rec1.jpg" width="742" border="0" /></a>';	recordingAds[1] = '<a href="/featuredthismonth" id="homeRecording"><img src="/site/v3images/ban_rec4.jpg" width="742" border="0" /></a>';	recordingAds[2] = '<a href="http://soniccircus.com/beatles-recording-chain" id="homeRecording"><img src="/site/v3images/ban_rec_beatles_recording_chain.jpg" width="742" border="0" /></a>';	recordingAds[3] = '<a href="http://soniccircus.com/pro-tools-hd-system"><img src="/site/v3images/ban_rec_protools_hd_apple.jpg" width="742" border="0" /></a>';	recordingAds[4] = '<a href="http://soniccircus.com/categories?search=qazwsx"><img src="/site/v3images/ban_rec_protools_stimulus.jpg" width="742" border="0" /></a>';		var ran_unrounded=Math.random()*5;	var ran_number=Math.floor(ran_unrounded);	document.write(recordingAds[ran_number]);}function liveBanners() {	var liveAds = new Array();	liveAds[0] = '<a href="/Live-Sound_2" id="homeLive"><img src="/site/v3images/ban_live1.jpg" width="742" border="0" /></a>';	liveAds[1] = '<a href="http://soniccircus.com/Soundcraft-Si2"><img src="/site/v3images/ban_si2.jpg" width="742" border="0" /></a>';	liveAds[2] = '<a href=""homeLive"><img src="/site/v3images/ban_live4.jpg" width="742" border="0" /></a>';	liveAds[3] = '<a href="http://soniccircus.com/categories?search=vrx900"><img src="/site/v3images/ban_vertec_vrx900.jpg" width="742" border="0" /></a>';		var ran_unrounded=Math.random()*4;	var ran_number=Math.floor(ran_unrounded);	document.write(liveAds[ran_number]);}function newsBanners() {	var liveAds = new Array();	liveAds[0] = '<a href="/Dwight-Sings-Buck" id="homeLive"><img src="/site/v3images/ban_news1.jpg" width="742" border="0" /></a>';	liveAds[1] = '<a href="/Its-Good-to-Be-Home-Derek-Trucks" id="homeLive"><img src="/site/v3images/ban_news2.jpg" width="742" border="0" /></a>';	liveAds[2] = '<a href="/whitestripes" id="homeLive"><img src="/site/v3images/ban_news3.jpg" width="742"  border="0" /></a>';	liveAds[3] = '<a href="/News" id="homeLive"><img src="/site/v3images/ban_news4.jpg" width="742" border="0" /></a>';	liveAds[4] = '<a href="/charlestonsound" id="homeLive"><img src="/site/v3images/ban_news5.jpg" width="742" border="0" /></a>';		var ran_unrounded=Math.random()*5;	var ran_number=Math.floor(ran_unrounded);	document.write(liveAds[ran_number]);}function vintBanners() {	var vintAds = new Array();	vintAds[0] = '<a href="/Used-Vintage-Gear"><img src="/site/v3images/ban_vint1_pultecs.jpg" width="742" border="0" /></a>';	vintAds[1] = '<a href="/Used-Vintage-Gear"><img src="/site/v3images/ban_vint2_gear_collge.jpg" width="742" border="0" /></a>';	vintAds[2] = '<a href="/Used-Vintage-Gear"><img src="/site/v3images/ban_vint3_1073alley.jpg" width="742" border="0" /></a>';		var ran_unrounded=Math.random()*3;	var ran_number=Math.floor(ran_unrounded);	document.write(vintAds[ran_number]);}function eduBanners() {	var eduAds = new Array();	eduAds[0] = '<img src="/site/v3images/ban_edu_digidesign.jpg" width="742" border="0" />';	eduAds[1] = '<img src="/site/v3images/ban_edu_mojave_ma200.jpg" width="742" border="0" />';	eduAds[2] = '<img src="/site/v3images/ban_edu_royer.jpg" width="742" border="0" />';	eduAds[3] = '<img src="/site/v3images/ban_edu_ssl.jpg" width="742" border="0" />';	eduAds[4] = '<img src="/site/v3images/ban_edu_waves.jpg" width="742" border="0" />';		var ran_unrounded=Math.random()*5;	var ran_number=Math.floor(ran_unrounded);	document.write(eduAds[ran_number]);}function mainBanners() {	var ads = new Array();	ads[0] = '<a href="/Recording" id="homeRecording"><img src="/site/v3images/ban_rec1.jpg" width="742" border="0" /></a>';		var ran_unrounded=Math.random()*1;	var ran_number=Math.floor(ran_unrounded);	document.write(ads[ran_number]);}function resizeThumbs(elem)  {	if (elem.width > elem.height) {		rat = max/elem.width;		elem.width = max;	} else {		rat = max/elem.height;		elem.height = max;	}}function replaceImage(sml, lrg) {	var container = document.getElementById("productImage");	container.innerHTML = '<a href="' + lrg + '" class="productZoomLink" title="Product Detail"><img src="' + sml + '" border="0" title="Product Detail" /></a>';	options = {		zoomWidth: 400,		zoomHeight: 300,		xOffset: 10,		yOffset: 0,		position: "right"	}	$('.productZoomLink').jqzoom(options);}function detailLoaded() {	var options = {		zoomWidth: 400,		zoomHeight: 300,		xOffset: 10,		yOffset: 0,		position: "right" //and MORE OPTIONS	};	$('.productZoomLink').jqzoom(options);}$(document).bind("contextmenu",function(e){	return false;});function SchoolsOut() {	noschool = "";	switch(School) {		case 'Berklee':		document.write('<img src="/site/images/schoolBerklee.png" border="0" width="100" id="schoolLogo" alt="Berklee" />');		break;				case 'Full Sail':		document.write('<img src="/site/images/schoolFullsail.png" border="0" width="100" id="schoolLogo" alt="FullSail" />');		break;				case 'Conservatory of Recording (Tempe)':		document.write('<img src="/site/images/schoolTempe.png" border="0" width="100" id="schoolLogo" alt="Tempe" />');		break;				default:		noschool = "1";	}	if (noschool != "1") {		document.write("<style>#logoHome {display: inline; float: left; margin-right: 20px;} #headerActions {width: 640px;} #schoolLogo {margin-top: 20px;} #headerContact {float: right;}</style>");		$(document).ready(function() {			$("#headerContact").before('<div id="academicTitle">Academic Store</div>');		});	}}