// DreamlightUSA JavaScript Document created 08-05-2011 from dreamlightusa.js
// updated  08-05-11, 11-30-11, 12-30-11
//
////////////////////////////////////////////////////////////////////////////////////////////////////
// menu functions
var time = 3000;
var numofitems = 18; // changed 12-30-11

//menu constructor
function menu(allitems,thisitem,startstate) {
	callname = "mi"+thisitem;
	divname = "menuInfo"+thisitem;
	
	this.numberofmenuitems = allitems;
	this.caller = document.getElementById(callname);
	this.thediv = document.getElementById(divname);
	this.thediv.style.visibility = startstate;
}
function ehandler(event, theobj, imagename, objectsrc) {
	for (var i = 1; i <= theobj.numberofmenuitems; i++) {
		var shutdiv = eval("menuitem" + i + ".thediv");
		shutdiv.style.visibility = "hidden";
	}
	theobj.thediv.style.visibility = "visible";
	
	if (document.images)
		document.images[imagename].src = eval(objectsrc+".src");
////////////////////////////////////////////////////////////////////////////////////////////////////
//	alert(getScrollHeight());
////////////////////////////////////////////////////////////////////////////////////////////////////
}

function closesubnav(event) {
	//if ((event.clientY < (80-getScrollHeight())) || (event.clientY > (140-getScrollHeight()))) {
	if ((event.clientY < (60-getScrollHeight())) || (event.clientY > (260-getScrollHeight()))) { // updated 05-04-11
		for (var i = 1; i<= numofitems; i++) {
			var shutdiv = eval('menuitem' + i + '.thediv');
			shutdiv.style.visibility = 'hidden';
		}
	}
}

h1=new Image(60,32)	;	h1.src="images/home.jpg";
h2=new Image(60,32);	h2.src="images/home_hover.jpg";
a1=new Image(63,32);	a1.src="images/about.jpg";
a2=new Image(63,32);	a2.src="images/about_hover.jpg";
cdw1=new Image(193,32);	cdw1.src="images/custom_design_workshop.jpg";
cdw2=new Image(193,32);	cdw2.src="images/custom_design_workshop_hover.jpg";
t1=new Image(110,32);	t1.src="images/team_apparel.jpg";
t2=new Image(110,32);	t2.src="images/team_apparel_hover.jpg";
s1=new Image(102,32);	s1.src="images/shop_online.jpg";
s2=new Image(102,32);	s2.src="images/shop_online_hover.jpg";
i1=new Image(189,32);	i1.src="images/international_distributors.jpg";
i2=new Image(189,32);	i2.src="images/international_distributors_hover.jpg";
c1=new Image(81,32);	c1.src="images/contact_us.jpg";
c2=new Image(81,32);	c2.src="images/contact_us_hover.jpg";

function filter(imagename,objectsrc) {
	if (document.images)
		document.images[imagename].src = eval(objectsrc+".src")
}

function getScrollWidth() {
	var w = window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft;
	return w ? w : 0;
} 

function getScrollHeight() {
	var h = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
	return h ? h : 0;
}

//////////////////////////////////////////////////
// new main menu
function mainmenu() { // changed 12-30-11
	var menutext = '';
	
	menutext += '<script type="text/javascript" src="includes/chrome.js">';
	menutext += '		/***********************************************';
	menutext += '		 * Chrome CSS Drop Down Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)';
	menutext += '		 * This notice MUST stay intact for legal use';
	menutext += '		 * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code';
	menutext += '		 ***********************************************/';
	menutext += '	</script>';
	menutext += '    <div class="chromestyle" id="chromemenu">';
	menutext += '    	<ul>';
	menutext += '        	<li><a href="index.htm" shape="rect" id="mi1" onmouseover="ehandler(event,menuitem1,\'home\',\'h2\');" onmouseout="filter(\'home\',\'h1\')"><img height="32" border="0" alt="DreamlightUSA" src="images/home.jpg" name="home" /></a></li>';
	menutext += '            <li><a href="about.htm" shape="rect" id="mi2" onmouseover="ehandler(event,menuitem2,\'about\',\'a2\');" onmouseout="filter(\'about\',\'a1\')" rel="dropmenu1"><img height="32" border="0" alt="About Dreamlight" src="images/about.jpg" name="about" /></a></li>';
	//  added dropdown for new cdw 11-30-11
	menutext += '            <li><a href="javascript:designWindow(\'cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" shape="rect" id="mi3" onmouseover="ehandler(event,menuitem3,\'cdw\',\'cdw2\');" onmouseout="filter(\'cdw\',\'cdw1\')"><img height="32" border="0" alt="Custom Design Workshop" src="images/custom_design_workshop.jpg" name="cdw" /></a></li>';
	
	menutext += '            <li><a href="team.htm" shape="rect" id="mi4" onmouseover="ehandler(event,menuitem4,\'team\',\'t2\');" onmouseout="filter(\'team\',\'t1\')" rel="dropmenu2"><img height="32" border="0" alt="Team Apparel" src="images/team_apparel.jpg" name="team" /></a></li>';
	menutext += '            <li><a href="http://dreamleos.com" shape="rect" id="mi5" onmouseover="ehandler(event,menuitem5,\'shop\',\'s2\');" onmouseout="filter(\'shop\',\'s1\')"><img height="32" border="0" alt="Shop Online at dreamleos.com" src="images/shop_online.jpg" name="shop" /></a></li>';
	menutext += '            <li><a href="international.htm" shape="rect" id="mi6" onmouseover="ehandler(event,menuitem6,\'international\',\'i2\');" onmouseout="filter(\'international\',\'i1\')"><img height="32" border="0" alt="International Distributors" src="images/international_distributors.jpg" name="international" /></a></li>';
	menutext += '            <li><a href="contact.htm" shape="rect" id="mi7" onmouseover="ehandler(event,menuitem7,\'contact\',\'c2\');" onmouseout="filter(\'contact\',\'c1\')"><img height="32" border="0" alt="Contact Us" src="images/contact_us.jpg" name="contact" /></a></li>';
	menutext += '        </ul>';
	menutext += '    </div>';
	menutext += '    <!--1st drop down menu -->';
	menutext += '    <div id="dropmenu1" class="dropmenudiv">';
	menutext += '    	<a href="about.htm" shape="rect" id="mi8" onmouseover="ehandler(event,menuitem8);">Introduction</a>';
	menutext += '        <a href="sizing.htm" shape="rect" id="mi9" onmouseover="ehandler(event,menuitem9);">Sizing Information</a>';
	menutext += '        <a href="care.htm" shape="rect" id="mi10" onmouseover="ehandler(event,menuitem10);">Garment Care</a>';
	menutext += '        <a href="policies.htm" shape="rect" id="mi11" onmouseover="ehandler(event,menuitem11);">Policies</a>';
	menutext += '        <a href="faq.htm" shape="rect" id="mi12" onmouseover="ehandler(event,menuitem12);">FAQ&acute;s</a>';
	menutext += '    </div>';
	menutext += '    <!--2nd drop down menu -->';
	menutext += '    <div id="dropmenu2" class="dropmenudiv">';
	menutext += '    	<a href="catalog/catalog.htm" shape="rect" id="mi13" onmouseover="ehandler(event,menuitem13);">2011-2012 Team Catalog</a>';
	menutext += '        <a href="javascript:designWindow(\'cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" shape="rect" id="mi14" onmouseover="ehandler(event,menuitem14);">Custom Design Workshop</a>';
	menutext += '        <a href="javascript:openHelp(0)" shape="rect" id="mi15" onmouseover="ehandler(event,menuitem15);">Custom Design Workshop Help</a>';
	menutext += '        <a href="production.htm" shape="rect" id="mi16" onmouseover="ehandler(event,menuitem16);">Production Schedule</a>';
	menutext += '        <a href="javascript:requestWindow(\'request.htm\', 0, 0, 460, 440)" shape="rect" id="mi17" onmouseover="ehandler(event,menuitem17);">Request Form</a>';
	menutext += '        <a href="bonus.php" shape="rect" id="mi18" onmouseover="ehandler(event,menuitem18);">Bonus Page</a>';
	menutext += '    </div>';
	//  added dropdown for new cdw 11-30-11
	//menutext += '    <!--3rd drop down menu -->';
	//menutext += '    <div id="dropmenu3" class="dropmenudiv">';
	//menutext += '        <a href="javascript:designWindow(\'cdw/cdw.php?select=9\', 0, 0, 960, 720)" shape="rect" id="mi3" onmouseover="ehandler(event,menuitem3);">Custom Design Workshop</a>';
	//menutext += '        <a href="javascript:designWindow_test(\'cdw_2012/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" shape="rect" id="mi19" onmouseover="ehandler(event,menuitem19);">2012 Custom Design Workshop Beta Version</a>';
	//menutext += '    </div>';
	
	menutext += '    <script type="text/javascript">cssdropdown.startchrome("chromemenu")</script>';
	menutext += '    <div id="menuInformation">';
	menutext += '        <div id="menuInfo1" class="menuInformation"> <a href="index.htm">Return to the Home page</a>  </div>';
	menutext += '        <div id="menuInfo2" class="menuInformation"> <a href="about.htm">Introduction</a> | <a href="sizing.htm">Sizing Information</a> | <a href="care.htm">Garment Care</a> | <a href="policies.htm">Policies</a> | <a href="faq.htm">FAQ&acute;s</a> </div>';
	menutext += '        <div id="menuInfo3" class="menuInformation"> <a href="javascript:designWindow(\'cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" > Customize your Leotard or Warm-Up by picking the fabric, color and crystals (requires Flash Player 9)</a>  </div>';
	menutext += '        <div id="menuInfo4" class="menuInformation"> <a href="catalog/catalog.htm">2011-2012 Team Catalog</a> | <a href="javascript:designWindow(\'cdw/cdw.php?select=9\', 0, 0, 960, 720)">Custom Design Workshop</a> | <a href="javascript:openHelp(0)">Custom Design Workshop Help</a> | <a href="production.htm">Production Schedule</a> | <a href="javascript:requestWindow(\'request.htm\', 0, 0, 460, 440)">Request Form</a> | <a href="bonus.php">Bonus Page</a>  </div>';
	menutext += ' ';       
	menutext += '        <div id="menuInfo5" class="menuInformation"> <a href="http://dreamleos.com">Visit our online store at dreamleos.com</a>  </div>';
	menutext += '        <div id="menuInfo6" class="menuInformation"> <a href="international.htm">Listing of our current International Distributors</a>  </div>';
	menutext += '        <div id="menuInfo7" class="menuInformation"> <a href="contact.htm">Contact Information</a>  </div>';
	menutext += '        ';
	menutext += '        <div id="menuInfo8" class="menuInformation"> <a href="about.htm">About Dreamlight Activewear</a>  </div>';
	menutext += '        <div id="menuInfo9" class="menuInformation"> <a href="sizing.htm">Dreamlight Activewear Sizing Information</a>  </div>';
	menutext += '        <div id="menuInfo10" class="menuInformation"> <a href="care.htm">Dreamlight Activewear Garment Care</a>  </div>';
	menutext += '        <div id="menuInfo11" class="menuInformation"> <a href="policies.htm">Dreamlight Activewear Policies</a>  </div>';
	menutext += '        <div id="menuInfo12" class="menuInformation"> <a href="faq.htm">Frequently Asked Questions</a>  </div>';
	menutext += '        ';
	menutext += '        <div id="menuInfo13" class="menuInformation"> <a href="catalog/catalog.htm">2011 - 2012 Team Catalog</a>  </div>';
	menutext += '        <div id="menuInfo14" class="menuInformation"> <a href="javascript:designWindow(\'cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')">Custom Design Workshop</a>  </div>';
	menutext += '        <div id="menuInfo15" class="menuInformation"> <a href="javascript:openHelp(0)">Custom Design Workshop Help</a>  </div>';
	menutext += '        <div id="menuInfo16" class="menuInformation"> <a href="production.htm">Production Schedule</a>  </div>';
	menutext += '        <div id="menuInfo17" class="menuInformation"> <a href="javascript:requestWindow(\'request.htm\', 0, 0, 460, 440)">Request Form</a>  </div>';
	menutext += '        <div id="menuInfo18" class="menuInformation"> <a href="bonus.php">Bonus Page</a>  </div>';
	// added 11-30-11
	//menutext += '        <div id="menuInfo19" class="menuInformation"> <a href="javascript:designWindow_test(\'cdw_2012/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" > The NEW 2012 Custom Design Workshop Beta Version (requires Flash Player 9)</a>  </div>';
	
	menutext += '        ';
	menutext += '        <script type=\'text/javascript\'>';
	menutext += '			var menuitem1 = new menu(18,1,\'hidden\');';
	menutext += '			var menuitem2 = new menu(18,2,\'hidden\');';
	menutext += '			var menuitem3 = new menu(18,3,\'hidden\');';
	menutext += '			var menuitem4 = new menu(18,4,\'hidden\');';
	menutext += '			var menuitem5 = new menu(18,5,\'hidden\');';
	menutext += '			var menuitem6 = new menu(18,6,\'hidden\');';
	menutext += '			var menuitem7 = new menu(18,7,\'hidden\');';
	menutext += '			var menuitem8 = new menu(18,8,\'hidden\');';
	menutext += '			var menuitem9 = new menu(18,9,\'hidden\');';
	menutext += '			var menuitem10 = new menu(18,10,\'hidden\');';
	menutext += '			var menuitem11 = new menu(18,11,\'hidden\');';
	menutext += '			var menuitem12 = new menu(18,12,\'hidden\');';
	menutext += '			var menuitem13 = new menu(18,13,\'hidden\');';
	menutext += '			var menuitem14 = new menu(18,14,\'hidden\');';
	menutext += '			var menuitem15 = new menu(18,15,\'hidden\');';
	menutext += '			var menuitem16 = new menu(18,16,\'hidden\');';
	menutext += '			var menuitem17 = new menu(18,17,\'hidden\');';
	menutext += '			var menuitem18 = new menu(18,18,\'hidden\');';
	//menutext += '			var menuitem19 = new menu(19,19,\'hidden\');'; // added 11-30-11
	menutext += '		</script>';
	menutext += '    </div>';
	
	return(menutext);
}

//////////////////////////////////////////////////
// new main menu for catalog page
h1t=new Image(60,32);	h1t.src="../images/home.jpg";
h2t=new Image(60,32);	h2t.src="../images/home_hover.jpg";
a1t=new Image(63,32);	a1t.src="../images/about.jpg";
a2t=new Image(63,32);	a2t.src="../images/about_hover.jpg";
cdw1t=new Image(193,32);	cdw1t.src="../images/custom_design_workshop.jpg";
cdw2t=new Image(193,32);	cdw2t.src="../images/custom_design_workshop_hover.jpg";
t1t=new Image(110,32);	t1t.src="../images/team_apparel.jpg";
t2t=new Image(110,32);	t2t.src="../images/team_apparel_hover.jpg";
s1t=new Image(102,32);	s1t.src="../images/shop_online.jpg";
s2t=new Image(102,32);	s2t.src="../images/shop_online_hover.jpg";
i1t=new Image(189,32);	i1t.src="../images/international_distributors.jpg";
i2t=new Image(189,32);	i2t.src="../images/international_distributors_hover.jpg";
c1t=new Image(81,32);	c1t.src="../images/contact_us.jpg";
c2t=new Image(81,32);	c2t.src="../images/contact_us_hover.jpg";

function catalogmainmenu() {  // changed 12-30-11
	var menutext = '';
	
	menutext += '<script type="text/javascript" src="../includes/chrome.js">';
	menutext += '		/***********************************************';
	menutext += '		 * Chrome CSS Drop Down Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)';
	menutext += '		 * This notice MUST stay intact for legal use';
	menutext += '		 * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code';
	menutext += '		 ***********************************************/';
	menutext += '	</script>';
	menutext += '    <div class="chromestyle" id="chromemenu">';
	menutext += '    	<ul>';
	menutext += '        	<li><a href="../index.htm" shape="rect" id="mi1" onmouseover="ehandler(event,menuitem1,\'home\',\'h2t\');" onmouseout="filter(\'home\',\'h1t\')"><img height="32" border="0" alt="DreamlightUSA" src="../images/home.jpg" name="home" /></a></li>';
	menutext += '            <li><a href="../about.htm" shape="rect" id="mi2" onmouseover="ehandler(event,menuitem2,\'about\',\'a2t\');" onmouseout="filter(\'about\',\'a1t\')" rel="dropmenu1"><img height="32" border="0" alt="About Dreamlight" src="../images/about.jpg" name="about" /></a></li>';
	menutext += '            <li><a href="javascript:designWindow(\'../cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" shape="rect" id="mi3" onmouseover="ehandler(event,menuitem3,\'cdw\',\'cdw2t\');" onmouseout="filter(\'cdw\',\'cdw1t\')"><img height="32" border="0" alt="Custom Design Workshop" src="../images/custom_design_workshop.jpg" name="cdw" /></a></li>';
	menutext += '            <li><a href="../team.htm" shape="rect" id="mi4" onmouseover="ehandler(event,menuitem4,\'team\',\'t2t\');" onmouseout="filter(\'team\',\'t1t\')" rel="dropmenu2"><img height="32" border="0" alt="Team Apparel" src="../images/team_apparel.jpg" name="team" /></a></li>';
	menutext += '            <li><a href="http://dreamleos.com" shape="rect" id="mi5" onmouseover="ehandler(event,menuitem5,\'shop\',\'s2t\');" onmouseout="filter(\'shop\',\'s1t\')"><img height="32" border="0" alt="Shop Online at dreamleos.com" src="../images/shop_online.jpg" name="shop" /></a></li>';
	menutext += '            <li><a href="../international.htm" shape="rect" id="mi6" onmouseover="ehandler(event,menuitem6,\'international\',\'i2t\');" onmouseout="filter(\'international\',\'i1t\')"><img height="32" border="0" alt="International Distributors" src="../images/international_distributors.jpg" name="international" /></a></li>';
	menutext += '            <li><a href="../contact.htm" shape="rect" id="mi7" onmouseover="ehandler(event,menuitem7,\'contact\',\'c2t\');" onmouseout="filter(\'contact\',\'c1t\')"><img height="32" border="0" alt="Contact Us" src="../images/contact_us.jpg" name="contact" /></a></li>';
	menutext += '        </ul>';
	menutext += '    </div>';
	menutext += '    <!--1st drop down menu -->';
	menutext += '    <div id="dropmenu1" class="dropmenudiv">';
	menutext += '    	<a href="../about.htm" shape="rect" id="mi8" onmouseover="ehandler(event,menuitem8);">Introduction</a>';
	menutext += '        <a href="../sizing.htm" shape="rect" id="mi9" onmouseover="ehandler(event,menuitem9);">Sizing Information</a>';
	menutext += '        <a href="../care.htm" shape="rect" id="mi10" onmouseover="ehandler(event,menuitem10);">Garment Care</a>';
	menutext += '        <a href="../policies.htm" shape="rect" id="mi11" onmouseover="ehandler(event,menuitem11);">Policies</a>';
	menutext += '        <a href="../faq.htm" shape="rect" id="mi12" onmouseover="ehandler(event,menuitem12);">FAQ&acute;s</a>';
	menutext += '    </div>';
	menutext += '    <!--2nd drop down menu -->';
	menutext += '    <div id="dropmenu2" class="dropmenudiv">';
	menutext += '    	<a href="catalog.htm" shape="rect" id="mi13" onmouseover="ehandler(event,menuitem13);">2011-2012 Team Catalog</a>';
	menutext += '        <a href="javascript:designWindow(\'../cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" shape="rect" id="mi14" onmouseover="ehandler(event,menuitem14);">Custom Design Workshop</a>';
	menutext += '        <a href="javascript:openHelp(1)" shape="rect" id="mi15" onmouseover="ehandler(event,menuitem15);">Custom Design Workshop Help</a>';
	menutext += '        <a href="../production.htm" shape="rect" id="mi16" onmouseover="ehandler(event,menuitem16);">Production Schedule</a>';
	menutext += '        <a href="javascript:requestWindow(\'../request.htm\', 0, 0, 460, 440)" shape="rect" id="mi17" onmouseover="ehandler(event,menuitem17);">Request Form</a>';
	menutext += '        <a href="../bonus.php" shape="rect" id="mi18" onmouseover="ehandler(event,menuitem18);">Bonus Page</a>';
	menutext += '    </div>';
	//  added dropdown for new cdw 11-30-11
	//menutext += '    <!--3rd drop down menu -->';
	//menutext += '    <div id="dropmenu3" class="dropmenudiv">';
	//menutext += '        <a href="javascript:designWindow(\'../cdw/cdw.php?select=9\', 0, 0, 960, 720)" shape="rect" id="mi3" onmouseover="ehandler(event,menuitem3);">Custom Design Workshop</a>';
	//menutext += '        <a href="javascript:designWindow_test(\'../cdw_2012/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" shape="rect" id="mi19" onmouseover="ehandler(event,menuitem19);">2012 Custom Design Workshop Beta Version</a>';
	//menutext += '    </div>';
	
	menutext += '    <script type="text/javascript">cssdropdown.startchrome("chromemenu")</script>';
	menutext += '    <div id="menuInformation">';
	menutext += '        <div id="menuInfo1" class="menuInformation"> <a href="../index.htm">Return to the Home page</a>  </div>';
	menutext += '        <div id="menuInfo2" class="menuInformation"> <a href="../about.htm">Introduction</a> | <a href="../sizing.htm">Sizing Information</a> | <a href="../care.htm">Garment Care</a> | <a href="../policies.htm">Policies</a> | <a href="../faq.htm">FAQ&acute;s</a> </div>';
	menutext += '        <div id="menuInfo3" class="menuInformation"> <a href="javascript:designWindow(\'../cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" > Customize your Leotard or Warm-Up by picking the fabric, color and crystals (requires Flash Player 9)</a>  </div>';
	menutext += '        <div id="menuInfo4" class="menuInformation"> <a href="catalog.htm">2011-2012 Team Catalog</a> | <a href="javascript:designWindow(\'../cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')">Custom Design Workshop</a> | <a href="javascript:openHelp(1)">Custom Design Workshop Help</a> | <a href="../production.htm">Production Schedule</a> | <a href="javascript:requestWindow(\'../request.htm\', 0, 0, 460, 440)">Request Form</a> | <a href="../bonus.php">Bonus Page</a>  </div>';
	menutext += ' ';       
	menutext += '        <div id="menuInfo5" class="menuInformation"> <a href="http://dreamleos.com">Visit our online store at dreamleos.com</a>  </div>';
	menutext += '        <div id="menuInfo6" class="menuInformation"> <a href="../international.htm">Listing of our current International Distributors</a>  </div>';
	menutext += '        <div id="menuInfo7" class="menuInformation"> <a href="../contact.htm">Contact Information</a>  </div>';
	menutext += '        ';
	menutext += '        <div id="menuInfo8" class="menuInformation"> <a href="../about.htm">About Dreamlight Activewear</a>  </div>';
	menutext += '        <div id="menuInfo9" class="menuInformation"> <a href="../sizing.htm">Dreamlight Activewear Sizing Information</a>  </div>';
	menutext += '        <div id="menuInfo10" class="menuInformation"> <a href="../care.htm">Dreamlight Activewear Garment Care</a>  </div>';
	menutext += '        <div id="menuInfo11" class="menuInformation"> <a href="../policies.htm">Dreamlight Activewear Policies</a>  </div>';
	menutext += '        <div id="menuInfo12" class="menuInformation"> <a href="../faq.htm">Frequently Asked Questions</a>  </div>';
	menutext += '        ';
	menutext += '        <div id="menuInfo13" class="menuInformation"> <a href="catalog.htm">2011 - 2012 Team Catalog</a>  </div>';
	menutext += '        <div id="menuInfo14" class="menuInformation"> <a href="javascript:designWindow(\'../cdw/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')">Custom Design Workshop</a>  </div>';
	menutext += '        <div id="menuInfo15" class="menuInformation"> <a href="javascript:openHelp(1)">Custom Design Workshop Help</a>  </div>';
	menutext += '        <div id="menuInfo16" class="menuInformation"> <a href="../production.htm">Production Schedule</a>  </div>';
	menutext += '        <div id="menuInfo17" class="menuInformation"> <a href="javascript:requestWindow(\'../request.htm\', 0, 0, 460, 440)">Request Form</a>  </div>';
	menutext += '        <div id="menuInfo18" class="menuInformation"> <a href="../bonus.php">Bonus Page</a>  </div>';
	// added 11-30-11
	//menutext += '        <div id="menuInfo19" class="menuInformation"> <a href="javascript:designWindow_test(\'../cdw_2012/cdw.php?select=9&record=0&invoice=0&item=1&cn=0\', 0, 0, 960, 720, \'form1\')" > The NEW 2012 Custom Design Workshop Beta Version (requires Flash Player 9)</a>  </div>';
	
	menutext += '        ';
	menutext += '        <script type=\'text/javascript\'>';
	menutext += '			var menuitem1 = new menu(18,1,\'hidden\');';
	menutext += '			var menuitem2 = new menu(18,2,\'hidden\');';
	menutext += '			var menuitem3 = new menu(18,3,\'hidden\');';
	menutext += '			var menuitem4 = new menu(18,4,\'hidden\');';
	menutext += '			var menuitem5 = new menu(18,5,\'hidden\');';
	menutext += '			var menuitem6 = new menu(18,6,\'hidden\');';
	menutext += '			var menuitem7 = new menu(18,7,\'hidden\');';
	menutext += '			var menuitem8 = new menu(18,8,\'hidden\');';
	menutext += '			var menuitem9 = new menu(18,9,\'hidden\');';
	menutext += '			var menuitem10 = new menu(18,10,\'hidden\');';
	menutext += '			var menuitem11 = new menu(18,11,\'hidden\');';
	menutext += '			var menuitem12 = new menu(18,12,\'hidden\');';
	menutext += '			var menuitem13 = new menu(18,13,\'hidden\');';
	menutext += '			var menuitem14 = new menu(18,14,\'hidden\');';
	menutext += '			var menuitem15 = new menu(18,15,\'hidden\');';
	menutext += '			var menuitem16 = new menu(18,16,\'hidden\');';
	menutext += '			var menuitem17 = new menu(18,17,\'hidden\');';
	menutext += '			var menuitem18 = new menu(18,18,\'hidden\');';
	//menutext += '			var menuitem19 = new menu(19,19,\'hidden\');'; // added 11-30-11
	menutext += '		</script>';
	menutext += '    </div>';
	
	return(menutext);
}

//////////////////////////////////////////////////
// open the custom design window
var designWin_09 = 0; // changed 12-30-11
function designWindow_09(URLStr, left, top, width, height) { // changed 12-30-11
	if(designWin) {
		if(!designWin.closed) designWin.close();
	}
	if (screen.width <= 1024)
		width = width + 16; // add 16px for scrollbar
	if (screen.width <= 1024)
		designWin = open(URLStr, 'designWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	else
		designWin = open(URLStr, 'designWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
//////////////////////////////////////////////////
// open custom design help window
var cdwHelp = 0;
function openHelp(l) {
	if(cdwHelp) {
		if(!cdwHelp.closed) cdwHelp.close();
	}
	if (l == 0) // added 12-30-11
		cdwHelp = open("cdw/cdwHelp.php", "cdwHelp", "top=40,left=40,width=800,height=600,status=yes,scrollbars=1,resizable=1");
	if (l == 1) // added 12-30-11
		cdwHelp = open("../cdw/cdwHelp.php", "cdwHelp", "top=40,left=40,width=800,height=600,status=yes,scrollbars=1,resizable=1");
}
//////////////////////////////////////////////////
// open the request window    0,0,460,440
function requestWindow(URLStr, left, top, width, height) {
  requestWin = open(URLStr, 'requestWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


//////////////////////////////////////////////////
// open imageViewer window with any image using iv.htm and placeImage()
/////////////////////
function imageViewer(loadImage, p_Width, p_Height, p_WImage) {
	agent = navigator.userAgent;
	windowName = "Preview";
	params  = "";
	params += "toolbar=0,";
	params += "location=0,";
	params += "directories=0,";
	params += "status=0,";
	params += "menubar=0,";
	params += "resizable=1,";
	params += "top=0,";
	params += "left=0,";
	
	if (screen.height > p_Height && screen.width > p_Width)
		params += "scrollbars=0,";
	else
		params += "scrollbars=1,";
	// check if image name has blank spaces
	if (loadImage.indexOf(" ") != -1) {
		start = loadImage.indexOf(" ");
		stemp = loadImage;
		s1 = "";
		
		while (stemp.indexOf(" ") != -1) {
			if (s1 == "")
				s1= stemp.substring(0, start);
			else
				s1 += "%20" + stemp.substring(0,stemp.indexOf(" "));
			stemp = stemp.substring(stemp.indexOf(" ")+1, stemp.length);
		}
		s1 += "%20" + stemp;
		loadImage = s1;
	}
	
	// assign window name depending on image
	windowName = p_WImage;
	
	if (p_Width == "null") {
		params += "width=800,";
		params += "height=600";
	}
	else  // set for a 1024x768 image
	{
		if (screen.width > 1024)
			params += "width=" + (p_Width) + ",";
		else if (p_Width < screen.width)
			params += "width=" + (p_Width) + ",";
		else
			params += "width=" + (screen.width) + ",";
		
		if (screen.height > 768)
			params += "height=" + (p_Height);
		else if (p_Height < screen.height)
			params += "height=" + (p_Height) + ",";
		else
			params += "height=" + (screen.height);
	}
	
	// set left and top margins
	lm = 0;
	tm = 0;
	
	if (p_Width < 100)
		lm = (100-p_Width)/2;
	if (p_Height < 120)
		tm = (120-p_Height)/2;
	// close the window to vary the window size
	if (typeof(win) == "object" && !win.closed) {
		win.close();
	}
	
	win = window.open(loadImage, windowName , params);
	if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) {
		win = window.open(loadImage, windowName , params);
	}
	if (!win.opener) {
		win.opener = window;
	}
	// bring the window to the front
	win.focus();
}
//////////////////////////////////////////////////
// place an image on the page
function placeImage(whatImage) {
	var text = '';
	
	if (whatImage.substring(0,1) == "0") {
		text += "<img src='catalog/images/_fabrics/" + whatImage.substring(1) + ".jpg' alt='Click to close window, right click to print window.' border='0'>";
	}
	else if (whatImage.substring(0,2) == "p3") {
		text += "<img src='preview/images/" + whatImage.substring(1) + ".jpg' alt='Click to close window, right click to print window.' border='0'>";
	}
	else if (whatImage.substring(0,3) == "p00") {
		text += "<img src='preview/images/" + whatImage.substring(1) + ".jpg' alt='Click to close window, right click to print window.' border='0'>";
	}
	else if (whatImage == "Preview01" || whatImage == "Preview02" || whatImage == "Preview03" || whatImage == "Preview04") {
		text += "<img src='preview/images/" + whatImage + ".jpg' alt='Click to close window, right click to print window.' border='0'>";
	}
	else
		text += "<img src='catalog/images/" + whatImage + ".jpg' alt='Click to close window, right click to print window.' border='0'>";
	
	return(text);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// misc. functions

//////////////////////////////////////////////////
// location information in white
function dladdress() {
	var text = '';
	text += "<center><br>\n";
	text += "<font face='Arial' color='#ffffff' size='4'>Dreamlight Activewear</font><br>\n";
	text += "<font face='Arial' color='#ffffff' size='2'>1620 Centerville Tnpk / Suite 119 / Virginia Beach, VA 23464</font><br>\n";
	text += "<font face='Arial' color='#ffffff' size='2'>Sales VA: (757) 479-8700 / Sales Toll Free: (866) 479-8700 / Fax: (757) 479-1986</font><br>\n";
	text += "</center>\n";
	
	return(text);
}
//////////////////////////////////////////////////
// Close window
function CloseMe() {
	if (self.parent.frames.length != 0) {
		self.parent.close();
	}
	else {
		close();
	}
}

//////////////////////////////////////////////////
// copyright information
////////////////////
// copyright in white
function copyright() {
	var text = '';
	text += "<font face='Arial'  size='1'>Copyright &copy; 2000-" + new Date().getFullYear() + " Dreamlight Activewear. All rights reserved.</font>";
	
	return(text);
}
/* copyright sample
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
	COPYRIGHT = "Copyright &copy; My Company Inc., 1990-";
	
	function writeCopyright() {
		document.write(COPYRIGHT, new Date().getFullYear(), ". All rights reserved.");
	}
</script>
</head>
<body>
<div align="center"> <script>writeCopyright();</script> </div>
</body>
</html>*/


////////////////////////////////////////////////////////////////////////////////////////////////////
//  new cdw functions
////////////////////////////////////////////////////////////////////////////////////////////////////
//  added 11-30-11 // changed 12-30-11
function designWindow(URLStr, left, top, width, height, form) {
	designWin = window.open(URLStr, 'designWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	
	// returnInfoArray = new Array("text", "style", "baseprice", "cat", "rating", "part", "image", "sleeve", "dl");
	styleField = eval("document." + form + "." + returnInfoArray[1] );  styleType = returnInfoArray[0];
	basepriceField = eval("document." + form + "." + returnInfoArray[2] );  basepriceType = returnInfoArray[0];
	catField = eval("document." + form + "." + returnInfoArray[3] );  catType = returnInfoArray[0];
	ratingField = eval("document." + form + "." + returnInfoArray[4] );  ratingType = returnInfoArray[0];
	partField = eval("document." + form + "." + returnInfoArray[5] );  partType = returnInfoArray[0];
	imageField = eval("document." + form + "." + returnInfoArray[6] );  imageType = returnInfoArray[0];
	sleeveField = eval("document." + form + "." + returnInfoArray[7] );  sleeveType = returnInfoArray[0];
	dlogoField = eval("document." + form + "." + returnInfoArray[8] );  dlogoType = returnInfoArray[0];
	optionsTypeField = eval("document." + form + "." + returnInfoArray[9] );  optionsTypeType = returnInfoArray[0];
	
//	fabricAreasArray = ("text", "areaA", "areaB", "areaC", "areaD", "areaE", "areaF", "areaG", "areaH", "neckline", "cuffs", "keyhole", "armBinding", "backBinding", "hoodA", "hoodB", "hoodLining", "jacketBanding", "pocketBinding");
	// added 06-08-11
	areaAField = eval("document." + form + "." + fabricAreasArray[1] );  areaAType = fabricAreasArray[0];
	areaBField = eval("document." + form + "." + fabricAreasArray[2] );  areaBType = fabricAreasArray[0];
	areaCField = eval("document." + form + "." + fabricAreasArray[3] );  areaCType = fabricAreasArray[0];
	areaDField = eval("document." + form + "." + fabricAreasArray[4] );  areaDType = fabricAreasArray[0];
	areaEField = eval("document." + form + "." + fabricAreasArray[5] );  areaEType = fabricAreasArray[0];
	areaFField = eval("document." + form + "." + fabricAreasArray[6] );  areaFType = fabricAreasArray[0];
	areaGField = eval("document." + form + "." + fabricAreasArray[7] );  areaGType = fabricAreasArray[0];
	areaHField = eval("document." + form + "." + fabricAreasArray[8] );  areaHType = fabricAreasArray[0];
	// added 06-08-11
	necklineField = eval("document." + form + "." + fabricAreasArray[9] );  necklineType = fabricAreasArray[0];
	cuffsField = eval("document." + form + "." + fabricAreasArray[10] );  cuffsType = fabricAreasArray[0];
	keyholeField = eval("document." + form + "." + fabricAreasArray[11] );  keyholeType = fabricAreasArray[0];
	armBindingField = eval("document." + form + "." + fabricAreasArray[12] );  armBindingType = fabricAreasArray[0];
	backBindingField = eval("document." + form + "." + fabricAreasArray[13] );  backBindingType = fabricAreasArray[0];
	hoodAField = eval("document." + form + "." + fabricAreasArray[14] );  hoodAType = fabricAreasArray[0];
	hoodBField = eval("document." + form + "." + fabricAreasArray[15] );  hoodBType = fabricAreasArray[0];
	hoodLiningField = eval("document." + form + "." + fabricAreasArray[16] );  hoodLiningType = fabricAreasArray[0];
	jacketBandField = eval("document." + form + "." + fabricAreasArray[17] );  jacketBandType = fabricAreasArray[0];
	pocketBindingField = eval("document." + form + "." + fabricAreasArray[18] );  pocketBindingType = fabricAreasArray[0];
	// added 06-08-11
	rhoutlineField = eval("document." + form + "." + crystalAreasArray[1] );  rhoutlineType = crystalAreasArray[0];
	rhsprinklesField = eval("document." + form + "." + crystalAreasArray[2] );  rhsprinklesType = crystalAreasArray[0];
	rpatternField = eval("document." + form + "." + crystalAreasArray[3] );  rpatternType = crystalAreasArray[0];
	rcustomField = eval("document." + form + "." + crystalAreasArray[4] );  rcustomType = crystalAreasArray[0];
	dlogoField = eval("document." + form + "." + crystalAreasArray[5] );  dlogoType = crystalAreasArray[0];
	// added 06-08-11
	//optionsArray = new Array("int", "L01", "L02", "L03", "L04", "L05", "L06","J01", "J02", "J03", "J04", "J05", "J06", "J07", "P01", "P02", "P03", "P04", "P05");
	L01Field = eval("document." + form + "." + optionsArray[1] );  L01Type = optionsArray[0];
	L02Field = eval("document." + form + "." + optionsArray[2] );  L02Type = optionsArray[0];
	L03Field = eval("document." + form + "." + optionsArray[3] );  L03Type = optionsArray[0];
	L04Field = eval("document." + form + "." + optionsArray[4] );  L04Type = optionsArray[0];
	L05Field = eval("document." + form + "." + optionsArray[5] );  L05Type = optionsArray[0];
	L06Field = eval("document." + form + "." + optionsArray[6] );  L06Type = optionsArray[0];
	J01Field = eval("document." + form + "." + optionsArray[7] );  J01Type = optionsArray[0];
	J02Field = eval("document." + form + "." + optionsArray[8] );  J02Type = optionsArray[0];
	J03Field = eval("document." + form + "." + optionsArray[9] );  J03Type = optionsArray[0];
	J04Field = eval("document." + form + "." + optionsArray[10] );  J04Type = optionsArray[0];
	J05Field = eval("document." + form + "." + optionsArray[11] );  J05Type = optionsArray[0];
	J06Field = eval("document." + form + "." + optionsArray[12] );  J06Type = optionsArray[0];
	J07Field = eval("document." + form + "." + optionsArray[13] );  J07Type = optionsArray[0];
	P01Field = eval("document." + form + "." + optionsArray[14] );  P01Type = optionsArray[0];
	P02Field = eval("document." + form + "." + optionsArray[15] );  P02Type = optionsArray[0];
	P03Field = eval("document." + form + "." + optionsArray[16] );  P03Type = optionsArray[0];
	P04Field = eval("document." + form + "." + optionsArray[17] );  P04Type = optionsArray[0];
	P05Field = eval("document." + form + "." + optionsArray[18] );  P05Type = optionsArray[0];
	// added 06-08-11
	L01cField = eval("document." + form + "." + optionsCBArray[1] );  L01cType = optionsCBArray[0];
	L02cField = eval("document." + form + "." + optionsCBArray[2] );  L02cType = optionsCBArray[0];
	L03cField = eval("document." + form + "." + optionsCBArray[3] );  L03cType = optionsCBArray[0];
	L04cField = eval("document." + form + "." + optionsCBArray[4] );  L04cType = optionsCBArray[0];
	L05cField = eval("document." + form + "." + optionsCBArray[5] );  L05cType = optionsCBArray[0];
	L06cField = eval("document." + form + "." + optionsCBArray[6] );  L06cType = optionsCBArray[0];
	J01cField = eval("document." + form + "." + optionsCBArray[7] );  J01cType = optionsCBArray[0];
	J02cField = eval("document." + form + "." + optionsCBArray[8] );  J02cType = optionsCBArray[0];
	J03cField = eval("document." + form + "." + optionsCBArray[9] );  J03cType = optionsCBArray[0];
	J04cField = eval("document." + form + "." + optionsCBArray[10] );  J04cType = optionsCBArray[0];
	J05cField = eval("document." + form + "." + optionsCBArray[11] );  J05cType = optionsCBArray[0];
	J06cField = eval("document." + form + "." + optionsCBArray[12] );  J06cType = optionsCBArray[0];
	J07cField = eval("document." + form + "." + optionsCBArray[13] );  J07cType = optionsCBArray[0];
	P01cField = eval("document." + form + "." + optionsCBArray[14] );  P01cType = optionsCBArray[0];
	P02cField = eval("document." + form + "." + optionsCBArray[15] );  P02cType = optionsCBArray[0];
	P03cField = eval("document." + form + "." + optionsCBArray[16] );  P03cType = optionsCBArray[0];
	P04cField = eval("document." + form + "." + optionsCBArray[17] );  P04cType = optionsCBArray[0];
	P05cField = eval("document." + form + "." + optionsCBArray[18] );  P05cType = optionsCBArray[0];
}

var returnInfoArray = new Array("text", "style", "baseprice", "cat", "rating", "part", "image", "sleeve", "dl", "optionsType");
var fabricAreasArray = new Array("text", "areaA", "areaB", "areaC", "areaD", "areaE", "areaF", "areaG", "areaH", "neckline", "cuffs", "keyhole", "armBinding", "backBinding", "hoodA", "hoodB", "hoodLining", "jacketBand", "pocketBinding");
var crystalAreasArray = new Array("text", "rhoutline", "rhsprinkles", "rpattern", "rcustom", "dlogo"); // added 06-08-11
var optionsArray = new Array("int", "L01", "L02", "L03", "L04", "L05", "L06","J01", "J02", "J03", "J04", "J05", "J06", "J07", "P01", "P02", "P03", "P04", "P05"); // added 06-08-11
var optionsCBArray = new Array("checkbox", "L01c", "L02c", "L03c", "L04c", "L05c", "L06c","J01c", "J02c", "J03c", "J04c", "J05c", "J06c", "J07c", "P01c", "P02c", "P03c", "P04c", "P05c"); // added 06-08-11
