function Get_Primary_Name() {
  var urlString = location.href.toLowerCase();
  site1 = urlString.lastIndexOf("index");
  site2 = urlString.lastIndexOf("/parties");
  site3 = urlString.lastIndexOf("parties=products");
  site4 = urlString.lastIndexOf("/tips");
  site5 = urlString.lastIndexOf("/stores");
  site6 = urlString.lastIndexOf("/register");
  site7 = urlString.lastIndexOf("/mylist");
  site8 = urlString.lastIndexOf("/birthdayclub");
  site9 = urlString.lastIndexOf("/smp");
  
  siteName="index";
  maxNum=site1;
  
  if (site2 > maxNum) {siteName="/parties"; maxNum=site2;}
  if (site3 > maxNum) {siteName="parties=products"; maxNum=site3;}
  if (site4 > maxNum) {siteName="/tips"; maxNum=site4;}
  if (site5 > maxNum) {siteName="/stores"; maxNum=site5;}
  if (site6 > maxNum) {siteName="/register"; maxNum=site6;}
  if (site7 > maxNum) {siteName="/mylist"; maxNum=site7;}
  if (site8 > maxNum) {siteName="/birthdayclub"; maxNum=site8;}
  if (site9 > maxNum) {siteName="/smp"; maxNum=site9;}
  return siteName;
}


function Get_Domain() {
  var urlString = location.href.toLowerCase();
  domain1 = urlString.lastIndexOf("partycity.com");
  domain2 = urlString.lastIndexOf("partycityonline.com");
  
  domainName="partycity.com";
  domainmaxNum=domain1;
  
  if (domain2 > domainmaxNum) {domainName="partycityonline.com"; domainmaxNum=domain2;}
  return domainName;
}


function Primary_Nav() { 
  siteName=Get_Primary_Name();
  domainName=Get_Domain();

  src2="";
  src3="";
  src4="";
  src5="";
  src6="";
  src7="";
  src8="";
  src9="";

  if (siteName == "/parties") 				{src2="_r";}
  if (siteName == "/tips") 					{src4="_r";}
  if (siteName == "/stores") 				{src5="_r";}
  if (siteName == "/register") 				{src6="_r";}
  if (siteName == "/mylist") 				{src7="_r";}
  if (siteName == "/birthdayclub") 			{src8="_r";}
  if (siteName == "parties=products") 		{src3="_r";src2="";}
  if (siteName == "/smp") 					{src9="_r";}

  document.write('<a href="/parties.shtml"				onMouseOver="MM_swapImage(\'parties\',\'\',\'/images/look/holiday2007/nav/nav_parties_r.gif\',1)"			onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_parties' + src2 + '.gif" name=parties width=56 height=20 border=0></a>');
  document.write('<a href="/cgi-bin/parties/products.cgi"				onMouseOver="MM_swapImage(\'products\',\'\',\'/images/look/holiday2007/nav/nav_products_r.gif\',1)"			onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_products' + src3 + '.gif" name=products width=64 height=20 border=0></a>');
  document.write('<a href="/tips.shtml"				onMouseOver="MM_swapImage(\'tips\',\'\',\'/images/look/holiday2007/nav/nav_tips_r.gif\',1)"		onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_tips' + src4 + '.gif" name=tips width=36 height=20 border=0></a>');
  document.write('<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"				onMouseOver="MM_swapImage(\'birthdayclub\',\'\',\'/images/look/holiday2007/nav/nav_birthdayclub_r.gif\',1)"		onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_birthdayclub' + src8 + '.gif" name=birthdayclub width=69 height=20 border=0></a>');
  document.write('<a href="/stores.shtml"				onMouseOver="MM_swapImage(\'stores\',\'\',\'/images/look/holiday2007/nav/nav_findstore_r.gif\',1)"		onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_findstore' + src5 + '.gif" name=stores width=70 height=20 border=0></a>');
  document.write('<a href="/register.shtml"				onMouseOver="MM_swapImage(\'register\',\'\',\'/images/look/holiday2007/nav/nav_register_r.gif\',1)"		onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_register' + src6 + '.gif" name=register width=58 height=20 border=0></a>');
  document.write('<a href="/cgi-bin/mylist/mylist.cgi"	onMouseOver="MM_swapImage(\'mylist\',\'\',\'/images/look/holiday2007/nav/nav_mylist_r.gif\',1)"		onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_mylist' + src7 + '.gif" name=mylist width=50 height=20 border=0></a>');

  if (domainName == "partycityonline.com") {
	  document.write('<a href="/atlanta/smp.shtml" 		onMouseOver="MM_swapImage(\'orgdiscounts\',\'\',\'/images/look/holiday2007/nav/nav_orgdiscounts_r.gif\',1)"		onMouseOut="MM_swapImgRestore()"><img src="/images/look/holiday2007/nav/nav_orgdiscounts' + src9 + '.gif" name=orgdiscounts width=140 height=20 border=0></a>');
  }

}



function Get_promos() { 
	domainName=Get_Domain();
	if (domainName == "partycityonline.com") {
		//document.write('<a href="javascript:MM_openBrWindow(\'http://72.32.183.42/cgi-bin/misc/costumes/show.cgi\',\'SneakPeek\',\'scrollbars=no,status=yes,width=795,height=720\')"><img src="/images/look/holiday2007/features/sneakpromo.jpg" alt="Party City Halloween Sneak Peek Las Vegas" width="630" height="53" border="0"></a>');
		document.write('<a href="/cgi-bin/parties/safety.cgi?parties=Halloween&productstype=Safety"><img src="/images/look/holiday2007/features/promos_safety.gif" alt="Party City Safety" width="214" height="53" border="0"></a><a href="/cgi-bin/misc/decorations/show.cgi"><img src="/images/look/holiday2007/features/top_decspot2.jpg" alt="top_decspot.jpg" width="200" height="53" border="0"></a><a href="/atlanta/promos/mickey.shtml"><img src="/images/look/holiday2007/features/promotions.gif" alt="Party City Promotions" width="217" height="53" border="0"></a>');
	}
	else {
		document.write('<a href="/tips.shtml"><img src="/images/look/holiday2007/features/promos_tips.jpg" alt="Party City Fall Thanksgiving Christmas Kwanzaa Hanukkah New Years Eve Tips Ecards Santa Letter" width="214" height="52" border="0"></a><a href="/tips/christmas/santaletter.shtml"><img src="/images/look/holiday2007/features/promos_santa.jpg" alt="Party City Fall Thanksgiving Christmas Kwanzaa Hanukkah New Years Eve Tips Ecards Santa Letter" width="198" height="52" border="0"></a><a href="/ecards/index.shtml"><img src="/images/look/holiday2007/features/promos_ecards.jpg" alt="Party City Fall Thanksgiving Christmas Kwanzaa Hanukkah New Years Eve Tips Ecards Santa Letter" width="217" height="52" border="0"></a>');
	}
}

function Get_footer() { 
	domainName=Get_Domain();
		document.write('<img src="/images/pixel.gif" width=1 height=10>');
		document.write('<table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td class="footer">');
		document.write('<a href="/parties.shtml" class=footer>PARTIES</a> | ');
		document.write('<a href="/cgi-bin/parties/products.cgi" class=footer>PRODUCTS</a> | ');
		document.write('<a href="/tips.shtml" class=footer>TIPS</a> | ');
		document.write('<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi" class=footer>PARTY CLUB</a> | ');
		document.write('<a href="/stores.shtml" class=footer>FIND STORE</a> | ');
		document.write('<a href="/register.shtml" class=footer>REGISTER</a> | ');
		document.write('<a href="/cgi-bin/mylist/mylist.cgi" class=footer>MY LIST</a> | ');

	if (domainName == "partycityonline.com") {
		document.write('<a href="/aboutus_atlanta.shtml" class=footer>ABOUT PARTY CITY</a> | ');
		document.write('<a href="/careers/newhire.shtml" class=footer>CAREERS</a>  | ');
	}
	else {
		document.write('<a href="/aboutus_corporate.shtml" class=footer>ABOUT PARTY CITY</a> | ');
		document.write('<a href="/cgi-bin/careers.cgi" class=footer>CAREERS</a>  | ');
	}

		document.write('<a href="/policies.shtml" class=footer>POLICIES</a> ');
		document.write('&nbsp;<br>&nbsp;<br>');
		document.write('&copy; <script>document.write(dateMsg());</script> PARTY CITY CORPORATION. ALL RIGHT RESERVED.');
		document.write('| <a href="/sitemap.shtml" class=footer>SITEMAP</a>  ');
		document.write('| <a href="/contactus.shtml" class=footer>CONTACT US</a> | <a href="/index.shtml" class=footer>PARTY CITY HOME</a></td></tr></table>');
}


function Get_sitemap() { 
	domainName=Get_Domain();

	if (domainName == "partycityonline.com") {
		document.write('<a href="/aboutus_atlanta.shtml" class="copyhdbulletbk">About Us</a>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_atlanta.shtml" class="copydark">Company Info</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_atlanta.shtml" class="copydark">Mission Statement</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_atlanta.shtml" class="copydark">Party Principles</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_atlanta.shtml" class="copydark">History</a><br>');
		document.write('<br>');
		document.write('<a href="/careers.shtml" class="copyhdbulletbk">Careers</a>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/careers/newhire.shtml" class="copydark">Recent Corporate Postings</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="http://72.32.183.43/careers/college/culture.shtml" class="copydark">College Recruitment</a><br>');
	}
	else {
		document.write('<a href="/aboutus_corporate.shtml" class="copyhdbulletbk">About Us</a>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_corporate.shtml" class="copydark">Company Info</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_corporate.shtml" class="copydark">Mission Statement</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_corporate.shtml" class="copydark">Party Principles</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="/aboutus_corporate.shtml" class="copydark">History</a><br>');
		document.write('<br>');
		document.write('<a href="/careers.shtml" class="copyhdbulletbk">Careers</a>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="http://72.32.183.43/cgi-bin/careers.cgi" class="copydark">Recent Corporate Postings</a><br>');
		document.write('<img src="/images/pixel.gif" width=12 height=11 border=0> &#183; <a href="http://72.32.183.43/careers/college/culture.shtml" class="copydark">College Recruitment</a><br>');
	}

}



function bdayclubpromo() {

var Quotation=new Array() // do not change this!

Quotation[0] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/babyshower.jpg" width="150" height="245" border="0"></a>';
Quotation[1] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/bachelorette.jpg" width="150" height="245" border="0"></a>';
Quotation[2] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/birthdays.jpg" width="150" height="245" border="0"></a>';
Quotation[3] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/bridalshower.jpg" width="150" height="245" border="0"></a>';
Quotation[4] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/firstbirthday.jpg" width="150" height="245" border="0"></a>';
Quotation[5] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/graduation.jpg" width="150" height="245" border="0"></a>';
Quotation[6] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/officeparties.jpg" width="150" height="245" border="0"></a>';
Quotation[7] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/themes.jpg" width="150" height="245" border="0"></a>';
Quotation[8] = '<a href="/cgi-bin/birthdayclub/myclub/myinfo.cgi"><img src="/birthdayclub/images/partyguides/large/wedding.jpg" width="150" height="245" border="0"></a>';

var Q = Quotation.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(Quotation[whichQuotation]);}
showQuotation();

}