// Start of Show Hide Content

/************************************************************************************************************
(C) www.dhtmlgoodies.com, November 2005
************************************************************************************************************/

var dhtmlgoodies_slideSpeed = 30;	// Higher value = faster
var dhtmlgoodies_timer = 10;	// Lower value = faster

var objectIdToSlideDown = false;
var dhtmlgoodies_activeId = false;
var dhtmlgoodies_slideInProgress = false;
function showHideContent(e,inputId)
{
	if(dhtmlgoodies_slideInProgress)return;
	dhtmlgoodies_slideInProgress = true;
	if(!inputId)inputId = this.id;
	inputId = inputId + '';
	var numericId = inputId.replace(/[^0-9]/g,'');
	var answerDiv = document.getElementById('dhtmlgoodies_a' + numericId);

	objectIdToSlideDown = false;
	
	if(!answerDiv.style.display || answerDiv.style.display=='none'){		
		if(dhtmlgoodies_activeId &&  dhtmlgoodies_activeId!=numericId){			
			objectIdToSlideDown = numericId;
			slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_slideSpeed*-1));
		}else{
			
			answerDiv.style.display='block';
			answerDiv.style.visibility = 'visible';
		
			
			slideContent(numericId,dhtmlgoodies_slideSpeed);
		}
	}else{
		slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
		dhtmlgoodies_activeId = false;
	}	
		
}

function slideContent(inputId,direction)
{
	
	var obj =document.getElementById('dhtmlgoodies_a' + inputId);
	var contentObj = document.getElementById('dhtmlgoodies_ac' + inputId);
	height = obj.clientHeight;
	if(height==0)height = obj.offsetHeight;
	height = height + direction;
	rerunFunction = true;
	if(height>contentObj.offsetHeight){
		height = contentObj.offsetHeight;
		rerunFunction = false;
	}
	if(height<=1){
		height = 1;
		rerunFunction = false;
	}

	obj.style.height = height + 'px';
	var topPos = height - contentObj.offsetHeight;
	if(topPos>0)topPos=0;
	contentObj.style.top = topPos + 'px';
	if(rerunFunction){
		setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
	}else{
		if(height<=1){
			obj.style.display='none'; 
			if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
				document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.display='block';
				document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.visibility='visible';
				slideContent(objectIdToSlideDown,dhtmlgoodies_slideSpeed);				
			}else{
				dhtmlgoodies_slideInProgress = false;
			}
		}else{
			dhtmlgoodies_activeId = inputId;
			dhtmlgoodies_slideInProgress = false;
		}
	}
}



function initShowHideDivs()
{
	var divs = document.getElementsByTagName('DIV');
	var divCounter = 1;
	for(var no=0;no<divs.length;no++){
		if(divs[no].className=='dhtmlgoodies_question'){
			divs[no].onclick = showHideContent;
			divs[no].id = 'dhtmlgoodies_q'+divCounter;
			var answer = divs[no].nextSibling;
			while(answer && answer.tagName!='DIV'){
				answer = answer.nextSibling;
			}
			answer.id = 'dhtmlgoodies_a'+divCounter;	
			contentDiv = answer.getElementsByTagName('DIV')[0];
			contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px'; 	
			contentDiv.className='dhtmlgoodies_answer_content';
			contentDiv.id = 'dhtmlgoodies_ac' + divCounter;
			answer.style.display='none';
			answer.style.height='1px';
			divCounter++;
		}		
	}	
}

// End of Show Hide Content

// Start of Plus Minus swap //

cc=0
function changeimage(myImage)
{
if (cc==0) 
{
cc=1
document.getElementById(myImage).src="../images/minus_sign.gif"
}
else
{
cc=0
document.getElementById(myImage).src="../images/plus_sign.gif"
}
}
// End of Plus Minus swap //



//Right side navigation menu functions

var myvar;
function menuinit() {
        document.getElementById('m1').style.display = 'none';
        document.getElementById('m2').style.display = 'none';
        document.getElementById('m3').style.display = 'none';
		document.getElementById('m4').style.display = 'none';
        document.getElementById('m5').style.display = 'none';
        document.getElementById('m6').style.display = 'none';
		document.getElementById('m7').style.display = 'none';
		document.getElementById('m8').style.display = 'none';
		document.getElementById('m9').style.display = 'none';
		document.getElementById('m10').style.display = 'none';
		document.getElementById('m11').style.display = 'none';
	document.getElementById('pm1').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm2').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm3').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm4').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm5').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm6').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm7').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm8').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm9').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm10').src = '../images/rightside_navi_arrow_up.gif';
	document.getElementById('pm11').src = '../images/rightside_navi_arrow_up.gif';
}
function menuexpand (i) {
        menuinit();
        if (myvar == i) {
		document.getElementById('p' + i).src = '../images/rightside_navi_arrow_up.gif';
		document.getElementById(i).style.display = 'none';
		myvar = '';
	}
        else {
		document.getElementById('p' + i).src = '../images/rightside_navi_arrow_down.gif';
		document.getElementById(i).style.display = 'block';
		myvar = i;
	}
}


//End of Right side navigation menu functions

function shimImage(img){
    img.src = "../images/clear.gif"
}

function checkinput(theForm)
{

  if (theForm.strSearch.value == "")
  {
    alert("Please enter a value for the \"Search\" field.");
    theForm.strSearch.focus();
    return (false);
  }
  
  if (theForm.strSearch.value.length < 2)
  {
    alert("Please enter more than one letter for the \"Search\" field.");
    theForm.strSearch.focus();
    return (false);
  }  
  
	return(true);
}

function CheckSearch(theForm)
{

  if (theForm.strSearch.value == "" && theForm.category.value == "-")
  {
    alert("Please either select a category, or enter a search term to find.");
    theForm.strSearch.focus();
    return (false);
  }
  
  
	return(true);
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
self.name = "mainWin"; }


function popUpCenteredWindow(strURL) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(strURL,"Window2","status=no,scrollbars=no,resizable=no,height=250,width=250,menubar=no,location=no,dependent=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	win2.focus();
}

function popUpCenteredWindow2(strURL) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/4) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/4) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(strURL,"Window3","status=no,scrollbars=no,resizable=no,height=250,width=400,menubar=no,location=no,dependent=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	win2.focus();
}

function openWindow(strURL, iWidth, iHeight)
{
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/4) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/4) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(strURL,"Window2","status=no,scrollbars=no,resizable=no,height=" + iHeight + ",width=" + iWidth + ",menubar=no,location=no,dependent=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	win2.focus();	
	return;
}

function openWindow2(strURL, iWidth, iHeight)
{
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/4) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/4) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(strURL,"Window2","status=no,scrollbars=yes,resizable=yes,height=" + iHeight + ",width=" + iWidth + ",menubar=no,location=no,dependent=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	win2.focus();	
	return;
}

function openWindow3(strURL, iWidth, iHeight)
{
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/4) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/4) - (100 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(strURL,"Window4","status=no,scrollbars=yes,resizable=no,height=" + iHeight + ",width=" + iWidth + ",menubar=no,location=no,dependent=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	win2.focus();	
	return;
}


<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = "../images/" +imgOn;
   }
}


// This funtion enables combo box navigation and close the POP window itself
function quickNav() {
	var page = document.indexForm.navIndex.value;
	var url = "barcode_catalog_" + page +  ".asp";
	document.location = url;
}
function closeWin() {
	window.close();
}

function foreground(url)
{
	b = window.open(url, 'b');
	b.focus();
}


// This funtion enables to pass the link to parent window and close itself
function forwardToShipping(url){
	self.opener.document.location = url
	window.close()
}

// This funtion enables to pass the link to parent window and close itself
function forwardLink(url){
	//document.open(url)
	window.close()
}

//Copyright 2006 Adobe Systems, Inc. All rights reserved.
//v1.0 f-source revision
//Flash Menu Click Twice Fix - Eric Zhou 0806
function AC_AddExtension(src, ext){
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs){ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';
	document.write(str);
	document.write('<div style="display:none;">Flash Menu provided by <a href="http://f-source.com">f-source.com</a></div>');
}

function replaceArgs(n){
	var rargs = new Array();
var currentNode;
currentNode = document.getElementsByTagName("object")[n-1];
rargs.push("codebase");
rargs.push(currentNode.codeBase);

rargs.push("width");
rargs.push(currentNode.width);
rargs.push("height");
rargs.push(currentNode.height);

 for(i=0; i<currentNode.childNodes.length; i++){
	 var cNode = currentNode.childNodes[i];
			if (cNode.tagName == "PARAM"){
				rargs.push(cNode.name.toLowerCase());
				if (cNode.name.toLowerCase() == "movie" || cNode.name.toLowerCase() == "flash_component"){
					var ind = cNode.value.indexOf('.swf');
					if (ind == -1)var ind = cNode.value.indexOf('.swc');
					rargs.push(cNode.value.substring(0, ind));
				}else{
					rargs.push(cNode.value);
				}
			}
 }
rargs.push("pluginspage");
rargs.push("http://www.macromedia.com/go/getflashplayer");

	return rargs;
}

function Run_f_source_menu(n){
	if(document.all) {
			var objNode = document.getElementsByTagName("object")[n-1];
			var fargs = new Array();
			var fargs = replaceArgs(n);
				var parNode = objNode.parentNode;
				parNode.removeChild(objNode);
			var ret = AC_GetArgs (  fargs, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash");
			AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
	}
}
function AC_FL_RunContent(){
  var ret = AC_GetArgs ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash");
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = AC_GetArgs (arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000", null );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
//End of Flash Menu Click Twice Fix - Eric Zhou 0806



// Image roll over effect
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
// End of image roll over effect

// Demo Form Validator //

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.txtBillFirstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.txtBillFirstName.focus();
    return (false);
  }

  if (theForm.txtBillLastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.txtBillLastName.focus();
    return (false);
  }

  if (theForm.txtBillCompanyName.value == "")
  {
    alert("Please enter a value for the \"Company Name\" field.");
    theForm.txtBillCompanyName.focus();
    return (false);
  }

  if (theForm.txtBillAddress1.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.txtBillAddress1.focus();
    return (false);
  }

  if (theForm.txtBillCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.txtBillCity.focus();
    return (false);
  }

  if (theForm.txtBillCountry.value == "")
  {
    alert("Please enter a value for the \"Country\" field.");
    theForm.txtBillCountry.focus();
    return (false);
  }
  
if (theForm.txtBillCountry.value == "USA"){

  if (theForm.txtBillState.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.txtBillState.focus();
    return (false);
  }

  if (theForm.txtBillState.value.length > 2)
  {
    alert("Please enter at most 2 characters in the \"State\" field.");
    theForm.txtBillState.focus();
    return (false);
  }

  if (theForm.txtBillZip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.txtBillZip.focus();
    return (false);
  }

  if (theForm.txtBillZip.value.length > 9)
  {
    alert("Please enter at most 9 characters in the \"Zip Code\" field.");
    theForm.txtBillZip.focus();
    return (false);
  }

}

  if (theForm.txtBillPhone.value == "")
  {
    alert("Please enter a value for the \"Phone\" field.");
    theForm.txtBillPhone.focus();
    return (false);
  }

  if (theForm.txtEmail.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.txtEmail.focus();
    return (false);
  }

if(!check_email(theForm.txtEmail.value)){

	alert("Please enter a valid email address.");
	theForm.txtEmail.focus(); 
	// if the browser is Netscape 6 or IE
		
	if(document.all || document.getElementByID){
		// change the color of text field
		theForm.txtEmail.style.background = "aliceblue";
	}
		
// make sure the form is not submitted
	return false;
}

	
return (true);


}

function check_email(e) {
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
		return (false);
		}	
	} 

	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
			
		if (!e.match(re) && e.match(re_two)) {
		return (-1);		
		} 
	}
}



<!-- Begin PopUp Survey
var expDays = 30; // number of days the cookie should last

var page = "http://www.surveymonkey.com/s.aspx?sm=H1aNswcw2EZZVqr0cBAvMw_3d_3d";
var windowprops = "width=725,height=450,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes";

//Pop-under window- By JavaScript Kit 
//Credit notice must stay intact for use 
//Visit http://javascriptkit.com for this script 
//specify page to pop-under 
var popunder="http://www.surveymonkey.com/s.aspx?sm=H1aNswcw2EZZVqr0cBAvMw_3d_3d" 
//specify popunder window features 
//set 1 to enable a particular feature, 0 to disable 
var winfeatures="width=725,height=450,scrollbars=1,resizable=1,toolbar=0,location=0,menubar=0,status=0,directories=0" 
//Pop-under only once per browser session? (0=no, 1=yes) 
//Specifying 0 will cause popunder to load every time page is loaded 
var once_per_session=1 /
//No editing beyond here required//

function loadpopunder(){

win2=window.open(popunder,"",winfeatures) 
win2.blur() 
window.focus()

}