// JavaScript Document

<!--//--><![CDATA[//><!--
/* IE 7 Drop Menu Fix */
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>
//author: Colin Cole -- cmcole@jamestower.com

//This will remove the start value when the user clicks into the textbox
function onFocusDeleteText(control)
{
	if(control.value != "" && control.value == control.getAttribute("startvalue")) {
		control.value = "";
		if (has(control,"dataclass")){
			if (control.className)
				control.className = control.getAttribute("dataclass");
			else
				control.setAttribute("class", control.getAttribute("dataclass"));
		}
	}	
}

//This will set it back to the start value, if the person didn't enter any data (happens when user leaves textbox)
function onBlurTextReplace(control)
{
	if(control.value == "") {
		control.value = control.getAttribute("startvalue");
		if (has(control,"emptyclass")){
			if (control.className)
				control.className = control.getAttribute("emptyclass");
			else
				control.setAttribute("class", control.getAttribute("emptyclass"));
		}
	}
}

//Firefox vs. IE --> checking to see if you actually want there to be styles.
function has(control,child){
  return ((control.hasAttribute && control.hasAttribute(child) ) || control.getAttribute(child));
}

//Draws  logo with Affiliate's Name if Subdomain dictates an existing Affiliate
function drawLogo() {
	curDomain = document.domain;
extractSubD = curDomain.split("giantpartystore", 2);
curSubDomain = extractSubD[0];
if (curSubDomain != "www.")  { 
	if (curSubDomain == "mypunchbowl.") {
		logoImg = "<img src='images/GPS_mypunchbowl.jpg' alt='Anderson&rsquo;s Giant Party  Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
		document.getElementById("mpb").style.display="block";
	}
	   if (curSubDomain == "thatsawrapper.") {
		logoImg = "<img src='images/GPS_thatsawrap.jpg' alt='Anderson&rsquo;s Giant Party  Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
	}
	   if (curSubDomain == "partymerchant.") {
		logoImg = "<img src='images/GPS_partymerchant.jpg' alt='Anderson&rsquo;s Giant Party  Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
	}
	if (curSubDomain == "ahappytime.") {
		logoImg = "<img src='images/GPS_ahappytime.jpg' alt='Anderson&rsquo;s Giant Party Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
	}
	if (curSubDomain == "themepartiesnmore.") {
		logoImg = "<img src='images/GPS_themPartiesnmore.jpg' alt='Anderson&rsquo;s Giant Party Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
	}
	if (curSubDomain == "") {
		logoImg = "<img src='images/AGPS08_logo.jpg' alt='Anderson&rsquo;s Giant Party Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
	}
	/*-----------------------------------------------------*/
	/*--- Grad Packs Program ---------------- below --------------*/
	/*-----------------------------------------------------*/
	var gradpackschooltitle="<div style='width:820px; height:35px;border-bottom:solid 1px #d7f7ff;'><img src='/images/gradpack09_schoolevents.gif' alt='Andersons Events' border='0' width='85' height=35' /> Anderson&rsquo;s School Events presents...</div><br style='clear:both;'><div id='gradpack_school_logo'><img src='/Uploads/15/GradPack/affiliateLogos/";
	var gradpackmenu="</span></div><div id='gradpack_menu'><a href='/Graduation/Catalog.cfm/iCatID/20899'><img src='/images/gradpackbuttons_graduation.jpg' alt='Graduation Products' border='0' vspace='3' hspace='2' /></a><a href='/Graduation/Graduation-Party-Packs/Catalog.cfm/iCatID/19146/blnFromPackView/0/iParentId/20899'><img src='/images/gradpackbuttons_tableware.jpg' alt='Solid Color Tableware Products' border='0' vspace='3' hspace='2' /></a><a href='/gradpackinfo.cfm'><img src='/images/gradpackbuttons_info.jpg' alt='Graduation Party Pack Program Information' border='0' vspace='3' hspace='2' /></a></div><br style='clear:both;'><font size='1'>*Please enter priority 389244 into the priority code field of the billing page during checkout.</font>";
	var gradpackgpslogo="<img src='images/AGPS08_logo.jpg' alt='Anderson&rsquo;s Giant Party  Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
	if (curSubDomain == "flhs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"flhs.gif' width='45' height='35' align='absmiddle' /> <span class='gpschooltitle'>Forest Lake High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "bbhs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Benjamin Banneker High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "map.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Ms. Amy&rsquo;s Place (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "dphs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Desert Pines High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "chhs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Collins Hill High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "ghs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Granton High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "whs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Wingate High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "ahs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Alliance High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	if (curSubDomain == "mvhs.") {
		logoImg = gradpackgpslogo;
		document.getElementById("mpb").style.display="block";
		document.getElementById("mpb").innerHTML=gradpackschooltitle+"spacer.gif' width='1' height='35' align='absmiddle' /> <span class='gpschooltitle'>Mounds View High School (Priority Code 389244)*"+gradpackmenu;
		document.getElementById("mpb").style.height="95px";
	}
	/*-----------------------------------------------------*/
	/*--- Grad Packs Program ---------------- above --------------*/
	/*-----------------------------------------------------*/
}
  else
    { 
 logoImg = "<img src='images/AGPS08_logo.jpg' alt='Anderson&rsquo;s Giant Party Store - Enhancing School Events, Celebrating Achievements &amp; Inspiring Fun!' width='209' height='120' border='0' id='_Hdr_01' oncontextmenu='alert(\"Anderson&rsquo;s Giant Party Store - Copyright&copy; 2009\"); return false;' />";
    }
document.write(logoImg);
}