function sendNewsletter()
{
  var email = document.getElementById("newsletter").value;
  
  if (email == "Your E-mail Address")
  {
    alert('Please enter your e-mail address before submitting.');
  }
  else
  {
    document.getElementById("newsletter").value = "Thanks!!!";
    window.location = "newsletter.php?hidden_news=" + email;
  }
}

function nextPicPage(page, numRows, filter)
{ 
  if (numRows >= 24)
  {
    if (filter == 0)
      window.location = "?standard=true&p=photos&page=" + (page + 1);
    else
      window.location = "?standard=true&p=photos&page=" + (page + 1) + "&filter=" + filter;
  }
}

function prevPicPage(page, numRows, filter)
{
  if (page > 1)
  {
    if (filter == 0)
      window.location = "?standard=true&p=photos&page=" + (page - 1);
    else
      window.location = "?standard=true&p=photos&page=" + (page - 1) + "&filter=" + filter;
  }
}

function trim(str, chars) {
    return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}

function newsletter_check()
{
  if ((trim(document.getElementById("fname").value) == "") || (trim(document.getElementById("lname").value) == "") || (trim(document.getElementById("email").value) == ""))
  {
    alert("Please be sure to fil out all starred fields.");
  }
  else
  {
    document.getElementById("news_frm").submit();
  }
}

function decorationHandler()
{
    var dropdown  = document.getElementById("decoration");
    var myindex  = dropdown.selectedIndex;
    var SelValue = dropdown.options[myindex].value;
    
    var productDrop = document.getElementById("product_span");
    switch (SelValue)
    {
      case "Screen Printing":
      {
          productDrop.innerHTML = "<select name='product' id='product' onchange='safeOnChange1(\"productHandler(this.form);\")'>" +
					                  "<option value='Select Type'>Select a type...</option>" +
                            "<option value='T-Shirt'>T-Shirt</option>" +
                            "<option value='Longsleeve Shirt'>Longsleeve Shirt</option>" +
                            "<option value='3/4 Sleeve Baseball Shirt'>3/4 Sleeve Baseball Shirt</option>" +
                            "<option value='Hooded Sweatshirt'>Hooded Sweatshirt</option>" +
                            "<option value='Crew Sweatshirt'>Crew Sweatshirt</option>" +
                            "<option value='Sweatpants'>Sweatpants</option>" +
                            "<option value='Shorts'>Shorts</option>" +
                            "<option value='Reversible Jersey'>Reversible Jersey</option>" +
                            "<option value='Sport Shirt'>Sport Shirt</option>" +
                            "<option value='Tote Bag'>Tote Bag</option></select>";

          productDrop.innerHTML = productDrop.innerHTML;
          break;
      }
      case "Embroidery":
      {   
          productDrop.disabled = false;
          productDrop.innerHTML = "<select name='product' id='product' onchange='safeOnChange1(\"productHandler(this.form);\")'>" +
                            "<option value='Select Type'>Select a type...</option>" +
                            "<option value='Sport Shirt'>Sport Shirt</option>" +
                            "<option value='Woven Shirt'>Woven Shirt</option>" +
                            "<option value='Bag'>Bag</option>" +
                            "<option value='Hat'>Hat</option>" +
                            "<option value='Beanie'>Beanie</option>" +
                            "<option value='Sweatband'>Sweatband</option>" +
                            "<option value='Wristband'>Wristband</option>" +
                            "<option value='Shorts'>Shorts</option>" +
                            "<option value='T-Shirt'>T-Shirt</option></select>";
          break;
      }
      case "Promotional Products":
      {
          productDrop.disabled = false;
          productDrop.innerHTML = "<select name='product' id='product' onchange='safeOnChange1(\"productHandler(this.form);\")'>" +
                            "<option value='Select Type'>Select a type...</option>" +
                            "<option value='Mugs'>Mugs</option>" +
                            "<option value='Pens'>Pens</option>" +
                            "<option value='Key Chains'>Key Chains</option>" +
                            "<option value='Drink Cozies'>Drink Cozies</option>" +
                            "<option value='Pint Glasses'>Pint Glasses</option>" +
                            "<option value='Shot Glasses'>Shot Glasses</option>" +
                            "<option value='Ping Pong Balls'>Ping Pong Balls</option>" +
                            "<option value='Frisbees'>Frisbees</option>" +
                            "<option value='Stress Balls'>Stress Balls</option></select>";
          break;                  
      }
      default:
      {
        productDrop.disabled = true;
        alert("Please choose a proper decoration type.");
      }
    }
}

function productHandler()
{
    var dropdown  = document.getElementById("product");
    var myindex  = dropdown.selectedIndex;
    var SelValue = dropdown.options[myindex].value;
    
    disable1();
    disable2();
    disable3();
    disable4();
    disableInd();
    
    switch (SelValue)
    {
      case "T-Shirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "Longsleeve Shirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "3/4 Sleeve Baseball Shirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "Hooded Sweatshirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "Crew Sweatshirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "Sweatpants":
      {
        enable1();
        enableInd();
        bottomOpt(document.getElementById("p1loc_span"), 1);
        break;
      }
      case "Shorts":
      {
        enable1();
        enableInd();
        bottomOpt(document.getElementById("p1loc_span"), 1);
        break;
      }
      case "Reversible Jersey":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span", 1));
        topOpt(document.getElementById("p2loc_span", 2));
        topOpt(document.getElementById("p3loc_span", 3));
        topOpt(document.getElementById("p4loc_span", 4));
        break;
      }
      case "Sport Shirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "Tote Bag":
      {
        enable1();
        enable2();
        enableInd();
        FBOpt(document.getElementById("p1loc_span"), 1);
        FBOpt(document.getElementById("p2loc_span"), 2);
        break;
      }
      case "Woven Shirt":
      {
        enable1();
        enable2();
        enable3();
        enable4();
        enableInd();
        topOpt(document.getElementById("p1loc_span"), 1);
        topOpt(document.getElementById("p2loc_span"), 2);
        topOpt(document.getElementById("p3loc_span"), 3);
        topOpt(document.getElementById("p4loc_span"), 4);
        break;
      }
      case "Bag":
      {
        enable1();
        enable2();
        enableInd();
        FBOpt(document.getElementById("p1loc_span"), 1);
        FBOpt(document.getElementById("p2loc_span"), 2);
        break;
      }
      case "Hat":
      {
        enable1();
        enable2();
        enableInd();
        FBOpt(document.getElementById("p1loc_span"), 1);
        FBOpt(document.getElementById("p2loc_span"), 2);
        break;
      }
      case "Beanie":
      {
        enable1();
        enable2();
        enableInd();
        FBOpt(document.getElementById("p1loc_span"), 1);
        FBOpt(document.getElementById("p2loc_span"), 2);
        break;
      }
      case "Sweatband":
      {
        enable1();
        enable2();
        enableInd();
        FBOpt(document.getElementById("p1loc_span"), 1);
        FBOpt(document.getElementById("p2loc_span"), 2);
        break;
      }
      case "Wristband":
      {
        enable1();
        enable2();
        enableInd();
        FBOpt(document.getElementById("p1loc_span"), 1);
        FBOpt(document.getElementById("p2loc_span"), 2);
        break;
      }
      case "Mugs":
      {
        break;
      }
      case "Pens":
      {
        break;
      }
      case "Key Chains":
      {
        break;
      }
      case "Drink Cozies":
      {
        break;
      }
      case "Pint Glasses":
      {
        break;
      }
      case "Shot Glasses":
      {
        break;
      }
      case "Ping Pong Balls":
      {
        break;
      }
      case "Frisbees":
      {
        break;
      }
      case "Stress Balls":
      {
        break;
      }      
      default:
      {
        alert("Please choose a proper product type.");
      }
    }
}

function disable1()
{
  document.getElementById("p1loc").disabled=true;
  document.getElementById("p1col").disabled=true;
}

function disable2()
{
  document.getElementById("p2loc").disabled=true;
  document.getElementById("p2col").disabled=true;
}  

function disable3()
{
  document.getElementById("p3loc").disabled=true;
  document.getElementById("p3col").disabled=true;
}

function disable4()
{
  document.getElementById("p4loc").disabled=true;
  document.getElementById("p4col").disabled=true;
}

function disableInd()
{
  document.getElementById("Ind1Y").disabled=true;
  document.getElementById("Ind2Y").disabled=true;
  document.getElementById("Ind1N").disabled=true;
  document.getElementById("Ind2N").disabled=true;
}

function enable1()
{
  document.getElementById("p1loc").disabled=false;
  document.getElementById("p1col").disabled=false;
}

function enable2()
{
  document.getElementById("p2loc").disabled=false;
  document.getElementById("p2col").disabled=false;
}  

function enable3()
{
  document.getElementById("p3loc").disabled=false;
  document.getElementById("p3col").disabled=false;
}

function enable4()
{
  document.getElementById("p4loc").disabled=false;
  document.getElementById("p4col").disabled=false;
}

function enableInd()
{
  document.getElementById("Ind1Y").disabled=false;
  document.getElementById("Ind2Y").disabled=false;
  document.getElementById("Ind1N").disabled=false;
  document.getElementById("Ind2N").disabled=false;
}

function topOpt(selector, id)
{
  selector.innerHTML = "<select name='p" + id + "loc' id='p" + id + "loc'>"+
                       "<option value='Select Location'>Select Location...</option>" +
                       "<option value='Full Front'>Full Front</option>" +
                       "<option value='Full Back'>Full Back</option>" +
                       "<option value='Left Chest'>Left Chest</option>" +
                       "<option value='Back Tag'>Back Tag</option>" +
                       "<option value='Left Sleeve'>Left Sleeve</option>" +
                       "<option value='Right Sleeve'>Right Sleeve</option></select>";
}

function bottomOpt(selector, id)
{
  selector.innerHTML = "<select name='p" + id + "loc' id='p" + id + "loc'>"+
                       "<option value='Select Location'>Select Location...</option>" +
                       "<option value='Upper Left Thigh'>Upper Left Thigh</option>" +
                       "<option value='Upper Right Thigh'>Upper Right Thigh</option>" +
                       "<option value='Full Left Leg'>Full Left Leg</option>" +
                       "<option value='Full Right Leg'>Full Right Leg</option>" +
                       "<option value='Lower Left Cuff'>Lower Left Cuff</option>" +
                       "<option value='Lower Right Cuff'>Lower Right Cuff</option></select>";
}

function FBOpt(selector, id)
{
  selector.innerHTML = "<select name='p" + id + "loc' id='p" + id + "loc'>"+
                       "<option value='Select Location'>Select Location...</option>" +
                       "<option value='Front'>Front</option>" +
                       "<option value='Back'>Back</option></select>";
}

function radioSwitch1Y()
{
  document.getElementById("Ind1N").checked=false;
}

function radioSwitch1N()
{
  document.getElementById("Ind1Y").checked=false;
}

function radioSwitch2Y()
{
  document.getElementById("Ind2N").checked=false;
}

function radioSwitch2N()
{
  document.getElementById("Ind2Y").checked=false;
}

function greek(form)
{
  document.getElementById("whichGreek").innerHTML = "Which greek organization? <input type=\"text\" name=\"whichgreek\"><br><br>";
  form.greekNo.checked=false;
}

function nogreek(form)
{
  document.getElementById("whichGreek").innerHTML = "";
  form.greekYes.checked=false;
}

function Submit(form)
{  
  if (form.captcha.value == captchaGet())
  {
    var dd = document.getElementById("how_did_you_hear").selectedIndex;
    var ss = document.getElementById("how_did_you_hear")[dd].text;
    if (ss != "")
    {
      document.getElementById("sendMail").value = "SET";
      document.getElementById("frm").submit();
    }
    else
    {
      alert("Please be sure to tell us who referred you.");
    }
  }
  else
  {
    alert("Security question did not match.");
  }
}

function goHome()
{
  window.location = "http://www.undergroundshirts.com";
}

function goPic()
{
  window.location = "/?standard=true&p=photos";
}

function gotoPic(id)
{
  window.location = "/?standard=true&p=photos&img=" + id;
}

function clearCaptcha(form)
{
  form.captcha.value = "";
  form.captcha.id = "captchaDark";
}

function picClick(location, id, cityState)
{
  document.getElementById("picViewer").innerHTML = '<img src="' + location + '">';
  document.getElementById("capViewer").innerHTML = cityState + '<br><div id="capText">' + document.getElementById("capHolder" + id).value + '</div>';
}

function locFilterHandler()
{
  var dropdown = document.getElementById("locFilter");
  var myindex  = dropdown.selectedIndex;
  var SelValue = dropdown.options[myindex].value;
  if (SelValue != 0)
    window.location = "?standard=true&p=photos&filter=" + SelValue;
  else
    window.location = "?standard=true&p=photos";
}

function picOverL(img)
{
  img.src = "images/left-arrow-over.png";
}

function picOverR(img)
{
  img.src = "images/right-arrow-over.png";
}

function picOutL(img)
{
  img.src = "images/left-arrow.png";
}

function picOutR(img)
{
  img.src = "images/right-arrow.png";
}

// www.sean.co.uk

function widthEffect(id, start, stop)
{
  document.getElementById(id).width = start;

  if (start <= stop)
  {
    setTimeout("widthEffect(\"" + id + "\", " + (start + 20) + ", " + stop + ")", 1);
  }
}

// executes an onchange function after 750ms (or specified delay)
function safeOnChange1( code, delay ) {
  delay = delay || 750;
  window.clearTimeout( soc_id );
  soc_id = window.setTimeout( code, delay );
} 
// global timer ID for the safeOnChange1 function.
var soc_id = null;

function Q1(btn)
{
  if (btn.name=="down")
  {
    document.getElementById("Q1").innerHTML = "Sometimes a white background square appears around an image on the shirt template.  The graphic designers have simply placed your original image file in the template for your approval.  The white boxes will not print on the shirt, only the image itself will appear.";
    document.getElementById("ans1").style.padding = "10px";
    btn.src="images/artQ_up.jpg";
    btn.name = "up";
  }
  else
  {
    document.getElementById("Q1").innerHTML = "";
    document.getElementById("ans1").style.padding = "1px";
    btn.src="images/artQ_down.jpg";
    btn.name = "down";
  }
}

function Q2(btn)
{
  if (btn.name=="down")
  {
    document.getElementById("Q2").innerHTML = "The color that will be printed is written on the approval.  Because monitor settings vary, it's impossible to create the exact color in the template that will be printed.  Contact your salesperson via phone or email if you have concerns about the color, and they will show you the various ways to ensure the color printed on your items is what you wanted.";
    document.getElementById("ans2").style.padding = "10px";
    btn.src="images/artQ_up.jpg";
    btn.name = "up";
  }
  else
  {
    document.getElementById("Q2").innerHTML = "";
    document.getElementById("ans2").style.padding = "1px";
    btn.src="images/artQ_down.jpg";
    btn.name = "down";
  }
}

function Q3(btn)
{
  if (btn.name=="down")
  {
    document.getElementById("Q3").innerHTML = "The exact dimensions of the design are listed on the art approval.  Due to many factors, we cannot show you an exact to-scale representation of what your shirt will look like.  The dimensions are either our standard dimensions or those you established with your salesperson.  If you have questions concerns about the size of your design, please contact your salesperson via phone or email.";
    document.getElementById("ans3").style.padding = "10px";
    btn.src="images/artQ_up.jpg";
    btn.name = "up";
  }
  else
  {
    document.getElementById("Q3").innerHTML = "";
    document.getElementById("ans3").style.padding = "1px";
    btn.src="images/artQ_down.jpg";
    btn.name = "down";
  }
}

function Q4(btn)
{
  if (btn.name=="down")
  {
    document.getElementById("Q4").innerHTML = "The image on the template of your garment itself is simply approximation of one style of an item.  Your actual item is listed on the art approval.  The template version is there for your reference only and to quickly confirm we're putting your design on the correct type of garment.  If you're concerned you might not be getting the correct garment, please contact your salesperson via phone or email.";
    document.getElementById("ans4").style.padding = "10px";
    btn.src="images/artQ_up.jpg";
    btn.name = "up";
  }
  else
  {
    document.getElementById("Q4").innerHTML = "";
    document.getElementById("ans4").style.padding = "1px";
    btn.src="images/artQ_down.jpg";
    btn.name = "down";
  }
}

function declineCOMM(btn)
{
  if (document.getElementById("warn_exists").value == "no")
  {
    if (document.getElementById("colorsY").checked &&
        document.getElementById("contentY").checked &&
        document.getElementById("dimensionsY").checked &&
        document.getElementById("locationsY").checked && 
        document.getElementById("garmentY").checked &&
        document.getElementById("spellingY").checked && document.getElementById("exists").value == "yes") 
    {
      document.getElementById("comments_text").focus;
      document.getElementById("theText").value = document.getElementById("comments_text").value;
      document.getElementById("comments").innerHTML = "";
      document.getElementById("exists").value = "no";
    }

    if ((document.getElementById("colorsN").checked ||
        document.getElementById("contentN").checked ||
        document.getElementById("dimensionsN").checked ||
        document.getElementById("locationsN").checked || 
        document.getElementById("garmentN").checked ||
        document.getElementById("spellingN").checked) && document.getElementById("exists").value == "no")
    {
      document.getElementById("comments").innerHTML = "<span id='bold'>Decline Instructions:</span><br><textarea id='comments_text' name='comments_text' rows='5' cols='60'>" + document.getElementById("theText").value + "</textarea><br><br><br>";
      document.getElementById("exists").value = "yes";
    }
  }
  else
  {
    alert("Please hit \"Cancel\" before changing your settiings.");
    restore_state();
  }
}


function declineSpecial()
{
  if (document.getElementById("accept").checked && document.getElementById("exists").value == "yes") 
  {
    document.getElementById("comments_text").focus;
    document.getElementById("theText").value = document.getElementById("comments_text").value;
    document.getElementById("comments").innerHTML = "<span id='bold'>Comments:</span><br><textarea id='comments_text' name='comments_text' rows='5' cols='29'>" + document.getElementById("theText").value + "</textarea><br><br><br>";
    document.getElementById("exists").value = "no";
  }

  if ((document.getElementById("decline").checked || document.getElementById("accept_changes").checked) && document.getElementById("exists").value == "no")
  {
    document.getElementById("comments").innerHTML = "<span id='bold'>Comments:</span><br><textarea id='comments_text' name='comments_text' rows='5' cols='29'>" + document.getElementById("theText").value + "</textarea><br><br><br>";
    document.getElementById("exists").value = "yes";
  }
}

var quote= new Array(12);

function save_state()
{
  quote[0]=document.getElementById("colorsY").checked;
  quote[1]=document.getElementById("colorsN").checked;
  quote[2]=document.getElementById("contentY").checked;
  quote[3]=document.getElementById("contentN").checked;
  quote[4]=document.getElementById("dimensionsY").checked;
  quote[5]=document.getElementById("dimensionsN").checked;
  quote[6]=document.getElementById("locationsY").checked;
  quote[7]=document.getElementById("locationsN").checked;
  quote[8]=document.getElementById("garmentY").checked;
  quote[9]=document.getElementById("garmentN").checked;
  quote[10]=document.getElementById("spellingY").checked;
  quote[11]=document.getElementById("spellingN").checked;
}

function restore_state()
{
  document.getElementById("colorsY").checked=quote[0];
  document.getElementById("colorsN").checked=quote[1];
  document.getElementById("contentY").checked=quote[2];
  document.getElementById("contentN").checked=quote[3];
  document.getElementById("dimensionsY").checked=quote[4];
  document.getElementById("dimensionsN").checked=quote[5];
  document.getElementById("locationsY").checked=quote[6];
  document.getElementById("locationsN").checked=quote[7];
  document.getElementById("garmentY").checked=quote[8];
  document.getElementById("garmentN").checked=quote[9];
  document.getElementById("spellingY").checked=quote[10];
  document.getElementById("spellingN").checked=quote[11];
}

function warning()
{
  var str = "";
  save_state();
  if (document.getElementById("colorsY").checked &&
      document.getElementById("contentY").checked &&
      document.getElementById("dimensionsY").checked &&
      document.getElementById("locationsY").checked && 
      document.getElementById("garmentY").checked &&
      document.getElementById("spellingY").checked)
  {
      document.getElementById("warn_exists").value = "yes";
      str += "<span id='warn'>I agree that by submitting this approval I am authorizing my artwork to be imprinted exactly as is shown in the approval.  Furthermore, I agree that Underground Printing will not be held responsible for anything incorrect in the final artwork.  By approving this art I am also agreeing to pay the full amount of the invoice for my order.<\span>";
      str += "<br><br><div id='art_buttons'><input type='button' id='button' value='Submit Approval' onclick='submit_art(false)'>&nbsp;&nbsp;<input type='button' id='button' value='Cancel' onclick='cancel_art()'></div>";
  }
  else
  {
      document.getElementById("warn_exists").value = "yes";
      str += "<span id='warn'>Declines are allowed only to correct inaccuracies between the art you requested and what you see in the approval.  They are not for making cosmetic changes to your design (adding new content, changing the design, etc.).  If you do wish to make any cosmetic changes, it will cause at least a 24-48 hour delay in the production of your items.<\span>";
      str += "<br><br><div id='art_buttons'><input type='button' id='button' value='Decline Artwork' onclick='submit_art(true)'>&nbsp;&nbsp;<input type='button' id='button' value='Cancel' onclick='cancel_art()'></div>";
  }
  document.getElementById("warning").innerHTML = str;
}

function submit_art(declined)
{
  if (declined && (document.getElementById("comments_text").value==""))
  {
    alert("You must provide a comment explaining why you are declining the artwork.");
  }
  else
  {
    document.getElementById("art_frm").submit();
  }
}

function cancel_art()
{
  document.getElementById("warn_exists").value = "no";
  document.getElementById("warning").innerHTML = '<div id="dumb_people">In order to approve your art for production you must select the "approve" circle for all the items listed above. If something is incorrect and needs to be declined, please select the decline circle and enter a detailed description of what needs to be changed.</div><br><input id="button" type="button" value="SUBMIT" onclick="warning()">';
}

function openSizeColorChart(id)
{
  window.open("http://www.undergroundshirts.com/size_color_chart.php?id=" + id ,"Size_and_Color_Chart","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,copyhistory=0,resizable=1");
}

function tab1()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t1.className == "unselected")
  {
    t1.className = "selected";
    t2.className = "unselected";
    t3.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<Br><Br>" +
"		<b>Spot Color Printing:</b>  The most common form of printing, spot color printing uses a full-tone of color to create an image. Each color in the image is printed separately on its own screen, affecting the cost, but up to 12 spot colors on one location can be printed.<br><Br>" +
"		<table id='pic_Table' border='0'>" +
"			<tr>" +
"				<td id='picTest'>" +
"					<img src='images/Spot Color.jpg'>" +
"				</td>" +
"				<td>&nbsp;</td>" +
"				<td>" +
"					<UL>" +
"						<LI>Yields Vibrant, Professional Quality Prints" +
"						<LI>Print on any color garment" +
"						<LI>Price: Less Expensive to More expensive, depending on the number of colors printed" +
"						<LI>Used For: Most standard print of logos, graphics, and text" +
"					</UL>" +
"				</td>" +
"			</tr>" +
"		</table>" +
"		<hr>" +
"		<br><br>" +
"		<b>Half-Tone Printing:</b> A frequently used technique in printing that allows lesser amount of ink in a certain color to be used, allowing it to mix with the garment color or other print colors to create the illusion of more colors than are actually being printed<Br><Br>" +
"			<table id='pic_Table' border='0'>" +
"				<tr>" +
"					<td id='picTest'>" +
"						<img src='images/Half-Tone.jpg'>" +
"					</td>" +
"					<td>&nbsp;</td>" +
"					<td>" +
"						<UL>" +
"							<LI>Yields more muted, lighter tones of color" +
"							<LI>Print on any color garment, recommended for dark prints on light color garments for best results" +
"							<LI>Price: Each half tone of a color is no more expensive than its full tone - a great way to save money when an additional color is needed in some situations" +
"							<LI>Used For:  Gradients, Background images, Using a Single color to look like its more than 1 color" +
"						</UL>" +
"					</td>" +
"				</tr>" +
"			</table>" +
"			<hr>" +
"		</div>" +
"		<br><br>" +
"		<b>Grayscale Printing:</b>  An inexpensive way to make a photograph or other multi color image into apparel. A grayscale of the image is created using full and half tones of black. Then the image can be printed in that 'grayscale' version on a garment in any print color you choose.<br><br>" +

		"<table id='pic_Table' border='0'>" +
		"	<tr>" +
		"		<td id='picTest'>" +
		"			<img src='images/Greyscale Process.jpg'>" +
		"		</td>" +
		"		<td>&nbsp;</td>" +
		"		<td>" +
		"			<UL>" +
		"				<LI>Yields a Combination of Vibrant and Muted Color, Quality depends on size and resolution of photo" +
		"				<LI>Print on any color garment, recommended for dark prints on light color garments for best results" +
		"				<LI>Price:  Inexpensive - the cheapest way to print a photograph or multi-colored image" +
		"				<LI>Used For: One color versions of photos and multi-color images" +
		"			</UL>" +
		"		</td>" +
		"	</tr>" +
		"</table>" +
		"<hr>" +
		"<br><br>" +
		"<b>4-Color CMYK Process Printing:</b>  When printing a full color image or photograph that involves many colors and many gradients or shades of colors, process  prints are used. The 4-Color CMYK process uses the basic colors Cyan, Magenta, Yellow and Black to create the image, much like an inkjet printer.<br><br>" +
		"<table id='pic_Table' border='0'>" +
		"	<tr>" +
		"		<td id='picTest'>" +
		"			<img src='images/4 Color CMYK Process.jpg'>" +
		"		</td>" +
		"		<td>&nbsp;</td>" +
		"		<td>" +
		"			<UL>" +
		"				<LI>Yields more muted, lighter colors (additional spot colors are recommended for text or items that need to stand out in the print)" +
		"				<LI>Print only on white garments" +
		"				<LI>Price: The lesser expensive way to create full color prints when many colors or shades of colors are involved" +
		"				<LI>Used For: Photographs or Multi-Colored images with many tones of color when printing on a white shirt" +
		"			</UL>" +
		"		</td>" +
		"	</tr>" +
		"</table>" +
		"<hr>" +
		"<br><Br>" +
		"<b>Simulated Process Printing:</b>  When printing a full color logo with many shades and tones of colors and a more vibrant, sharp print is desired, a simulated process is used. Unlike the 4-Color CMYK process, Sim-Process prints use a combination of spot colors and half tones to create all the colors in the image.<Br><Br>" +
		"<table id='pic_Table' border='0'>" +
		"	<tr>" +
		"		<td id='picTest'>" +
		"			<img src='images/Simulated Process.jpg'>" +
		"		</td>" +
		"		<td>&nbsp;</td>" +
		"		<td>" +
		"			<UL>" +
		"				<LI>Yields vibrant, professional quality prints" +
		"				<LI>Print on any color garment" +
		"				<LI>Price: This is a more expensive option to print multiple colors and shades than the 4-Color CMYK process, but it is still less expensive than using individual spot colors for every shade. Typically it involves the use of 4-8 colors to create the design." +
		"				<LI>Used for: Full color images with many tones of color when printing on a dark shirt" +
		"			</UL>" +
		"		</td>" +
		"	</tr>" +
		"</table>" +
		"<hr>" +
		"<br><Br>" +
		"<b>Distressed Printing:</b> In order to achieve a cracked, worn-in, eroded look, artists utilize filters prior to printing to remove parts of the images in a way to give it that vintage look.<Br><br>" +
		"<table id='pic_Table' border='0'>" +
		"	<tr>" +
		"		<td id='picTest'>" +
		"			<img src='images/Eroded.jpg'>" +
		"		</td>" +
		"		<td>&nbsp;</td>" +
		"		<td>" +
		"			<UL>" +
		"				<LI>Yields professional quality, eroded prints" +
		"				<LI>Print on any color garment, recommended for dark prints on light color garments for best results" +
		"				<LI>Price: There is no additional fee for making a print look eroded" +
		"				<LI>Used For: Vintage-looking prints" +
		"			</UL>" +
		"		</td>" +
		"	</tr>" +
		"</table>";
  }
}

function tab2()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t2.className == "unselected")
  {
    t2.className = "selected";
    t1.className = "unselected";
    t3.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<a href='images/UGP_StockColorChart750.jpg' rel='lightbox[colors]'><br><br>Click For A Larger Image<br><img src='images/UGP_StockColorChartWEB.jpg' width='450'></a>";
  }
}

function tab3()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t3.className == "unselected")
  {
    t3.className = "selected";
    t2.className = "unselected";
    t1.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<div id='factors'><img src='images/Screenprinting-Price-Factor.jpg'><br><br>"+
    "1. <B>Type of Garment:</b>  For almost every product type we have an inexpensive, mid-range, and high end option, and there are many styles to choose from – not just t-shirts!" +
    "<br><br>"+
    "2. <B>Quantity Ordered:</b> Due to the setup involved in screenprinting, the more shirts you order, the lower your price will be as you pass price break points." +
    "<br><br>"+
    "3. <B>Number of Locations Printed:</b>  Each location requires new setup and runs for your imprint. A front print only will always be cheaper than a front and back print." +
    "<br><br>"+
    "4. <B>Number of Colors on Each Design:</b> The number of colors in each design affects the run time and setup for each location. A one color print will be less expensive than a three color print. If you have a lot of colors and tones of colors in your design, a process print may be a cheaper solution." +
    "<br><br>"+
    "5. <B>In-Hands Date:</b>  Orders are produced on-demand for your due date. Garments needed in a few days from your order placement date will be more expensive than those needed in a few weeks."+
    "</div>";
  }
}

function tab1e()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t1.className == "unselected")
  {
    t1.className = "selected";
    t2.className = "unselected";
    t3.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<Br><Br>"+
"		<b>Standard Embroidery:</b> High quality, professional looking garments can be produced on our automatic, high-speed embroidery machines.<br><Br>"+
"		<table id='pic_Table' border='0'>"+
"			<tr>"+
"				<td id='picTest'>"+
"					<img src='images/Embroidery%20Main.jpg'>"+
"				</td>"+
"				<td>&nbsp;</td>"+
"				<td>"+
"					<UL>"+
"						<LI>Yields Vibrant, Professional Quality Stitching"+
"						<LI>Embroider on any color garment "+
"						<LI>Price: Less Expensive to More expensive, depending on the stitch count"+
"						<LI>Used For: Anything you'd like embroidered for that professional finish"+
"					</UL>"+
"				</td>"+
"			</tr>"+
"		</table>"+
"		<hr>"+
"		<br><br>"+
"		<b>Low Stitch Count:</b> The lower the stitch count, the less expensive the embroidery will be.  Low stitch count embroidery tends to be characterized by text and outlines of images with little fill stitching. These are examples of low stitch count embroidery.<Br><Br>"+
"		<img id='picTest2' src='images/Light_Stitch.jpg'>"+
"		<Br><br>"+
"		<hr>"+
"		<br><br>"+
"		<b>Normal Stitch Count:</b> Normal stitch count embroidery tends to be characterized by a combination of text and some small filled in objects and logos. The majority of the overall area of the embroidery still is not created with fill stitching. These are examples of normal stitch count embroidery.<br><br>"+
"		<img src='images/normal-stitch.jpg' id='picTest2'>"+
"		<Br><br>"+
"		<hr>"+
"		<br><br>"+
"		<b>High Stitch Count:</b> The higher the stitch count, the more expensive the embroidery will be. High stitch count embroidery tends to be characterized by the majority of the area of the design being filled in with stitches. These are examples of high stitch count embroidery.<br><br>"+
"		<img src='images/heavy_stitch.jpg' id='picTest2'>"+
"		<Br><br>";
  }
}

function tab2e()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t2.className == "unselected")
  {
    t2.className = "selected";
    t1.className = "unselected";
    t3.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<a href='images/UGP_ThreadColorChart750.jpg' rel='lightbox[colors]'><br><br>Click For A Larger Image<br><img src='images/UGP_ThreadColorChartWEB.jpg' width='450'></a>";
  }
}

function tab3e()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t3.className == "unselected")
  {
    t3.className = "selected";
    t2.className = "unselected";
    t1.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<div id='factors'><img src='images/Embroidery-Price-Factor.jpg'><br><br>"+
    "1. <B>Type of Garment:</b> For almost every product type we have an inexpensive, mid-range, and high end option, and there are many styles to choose from - not just t-shirts!" +
    "<br><br>"+
    "2. <B>Quantity Ordered:</b> Due to the setup involved in embroidery, the more shirts you order, the lower your price will be as you pass price break points." +
    "<br><br>"+
    "3. <B>Number of Locations Printed:</b> Each location requires new setup and runs for your imprint. A front hat location will be cheaper than a front hat and back hat location." +
    "<br><br>"+
    "4. <B>Stitch Count on Each Location:</b> The number of stitches affects your price for each imprint. The amount of area in a design and the amount of filled in area within determines the stitch count. A filled in circle will be more expensive than the outline of a circle the same size." +
    "<br><br>"+
    "5. <B>In-Hands Date:</b> Orders are produced on-demand for your due date. Garments needed in a few days from your order placement date will be more expensive than those needed in a few weeks."+
    "</div>";
  }
}

function tab1p()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t1.className == "unselected")
  {
    t1.className = "selected";
    t2.className = "unselected";
    t3.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<br><br>"+
"		<b>Vinyl Heat-Pressed Names & Numbers:</b> Because personalization would be prohibitively expensive to screenprint on each shirt, vinyl heat sealed names & numbers are used to customize shirts.  Check out the color chart for available colors and be sure to match your print color to the color of Vinyl Heat-Pressed Name or Number you choose. Personalization will add cost and time to the production of your order.<Br><Br>"+
"		<img id='picTest2' src='images/vinyl namenumber.jpg'>"+
"		<Br><br>"+
"		<hr>"+
"		<br><br>"+
"		<b>Embroidered Personalized Names:</b> Small individual names can be embroidered on garments (maximum width is 6 inches wide). We have a number of stock fonts to choose from. Personalization will add cost and time to the production of your order.<br><br>"+
"		<img id='picTest2' src='images/emb name.jpg'>"+
"		<Br><br>"+
"		<hr>"+
"		<br><br>"+
"		<b>NEW! Sim-Stitch Heat-Pressed Names & Numbers:</b> Want that embroidered look of a large name or number on a jersey? Sim-Stitch Letters are Heat-Pressed on to the shirt, but have a embroidered look to them without that expensive embroidered price. Colors are limited, please consult with our sales staff for a list of currently available colors and character sizes.<br><br>"+
"		<img id='picTest2' src='images/SimStitch.jpg'>"+
"		<Br><br>";
  }
}

function tab2p()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t2.className == "unselected")
  {
    t2.className = "selected";
    t1.className = "unselected";
    t3.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<a href='images/UGP_VinylColorChart750.jpg' rel='lightbox[colors]'><br><br>Click For A Larger Image<br><img src='images/UGP_VinylColorChartWEB.jpg' width='450'></a>";
  }
}

function tab3p()
{
  t1 = document.getElementById("tab1");
  t2 = document.getElementById("tab2");
  t3 = document.getElementById("tab3");
  
  if (t3.className == "unselected")
  {
    t3.className = "selected";
    t2.className = "unselected";
    t1.className = "unselected";
    document.getElementById("print_body_span").innerHTML = "<div id='factors'>"+
    "<br><b>Personalized Names:</b> $5 <br> "+
"   <ul><li> Jersey size/style names on the back of a garment"+
"    <li>Small embroidered names on the front of a garment</ul><br>"+
"    <B>Personalized Numbers:</b> $3  (per two-digit number)<br>"+
"    <ul><li>Jersey size/style numbers on the front or back of a garment</ul>"+
    "</div>";
  }
}

function POM_check()
{
  document.getElementById('POM_check_span').innerHTML = "Are you sure? <input type='button' value='No' onclick='POM_cancel()'> &nbsp; <input type='button' value='Yes' onclick='document.getElementById(\"POM_form\").submit();'>";
}

function POM_check2()
{
  document.getElementById('POM_check_span2').innerHTML = "Are you sure? <input type='button' value='No' onclick='POM_cancel2()'> &nbsp; <input type='button' value='Yes' onclick='document.getElementById(\"POM_form2\").submit();'>";
}

function POM_cancel()
{
    document.getElementById('POM_check_span').innerHTML = "<input type='button' id='finalUpload' value='Upload' onclick='POM_check()'>";
}

function POM_cancel2()
{
    document.getElementById('POM_check_span2').innerHTML = "<input type='button' id='finalUpload2' value='Upload' onclick='POM_check2()'>";
}

function setProdInfo(str, tab)
{
    document.getElementById('prod_info_text').innerHTML = str;
    
    switch (tab)
    {
      case '1':
        document.getElementById('ptab1').className = "on";
        document.getElementById('ptab2').className = "off";
        document.getElementById('ptab3').className = "off";
        document.getElementById('ptab4').className = "off";
        break;
      case '2':
        document.getElementById('ptab1').className = "off";
        document.getElementById('ptab2').className = "on";
        document.getElementById('ptab3').className = "off";
        document.getElementById('ptab4').className = "off";
        break;
      case '3':
        document.getElementById('ptab1').className = "off";
        document.getElementById('ptab2').className = "off";
        document.getElementById('ptab3').className = "on";
        document.getElementById('ptab4').className = "off";
        break;
      case '4':
        document.getElementById('ptab1').className = "off";
        document.getElementById('ptab2').className = "off";
        document.getElementById('ptab3').className = "off";
        document.getElementById('ptab4').className = "on";
        break;
      default:
        alert('Somehow you clicked a tab that doesn\'t exist.  Please contact us at sales@undergroundshirts.com so we can know to fix this.');
    }
}

function priceOver(price)
{
  switch (price)
  {
    case '1':
      document.getElementById('priceText_span').innerHTML = "This item is considered to be a low cost item for this style";
      break;
    case '2':
      document.getElementById('priceText_span').innerHTML = "This item is considered to be an average cost item for this style";
      break;
    case '3':
      document.getElementById('priceText_span').innerHTML = "This item is considered to be a high cost item for this style";
      break;
    default:
      alert("There has been an error on this site.  Please e-mail sails@undergroundshirts.com and let us know which page this occurred on.");
  }
  
  document.getElementById('priceText').className = "in";
}

function fittedOver()
{
  document.getElementById('priceText_span').innerHTML = "This is a fitted item";
  document.getElementById('priceText').className = "fIn";
}

function zoomOver()
{
  document.getElementById('priceText_span').innerHTML = "Click to view a larger image";
  document.getElementById('priceText').className = "zIn";
}

function mailOver()
{
  document.getElementById('priceText_span').innerHTML = "E-mail a friend about this product";
  document.getElementById('priceText').className = "mIn";
}

function priceOut()
{
  document.getElementById('priceText_span').innerHTML = "";
  
  document.getElementById('priceText').className = "out";
}

function refreshResults()
{
  var str = "product_search_results.php?";
  
  var asi = document.getElementById('prod_type_select').options[document.getElementById('prod_type_select').selectedIndex].value;
  var hide = document.getElementById("hide").value;
  
  if (hide=="yes")
  {
    str += "keyword=" + document.getElementById('keyword').value;
  }
  else if (asi=="Promo")
  {
    str += "asi=yes";
  }
  else
  {
    var style = document.getElementById('style').options[document.getElementById('style').selectedIndex].value;
    var brand = document.getElementById('brand').options[document.getElementById('brand').selectedIndex].value;
    var material = document.getElementById('material').options[document.getElementById('material').selectedIndex].value;
    var imprint = document.getElementById('imprint').options[document.getElementById('imprint').selectedIndex].value;
    var size = document.getElementById('size_size').value;
    
    if (style!="empty")
    {
      str += "&style=" + style;
    }
    
    if (document.getElementById("Men").checked)
    {
      str += "&men=yes";
    }
    
    if (document.getElementById("Women").checked)
    {
      str += "&women=yes";
    }
    
    if (document.getElementById("Youth").checked)
    {
      str += "&youth=yes";
    }
    
    if (document.getElementById("Fitted").checked)
    {
      str += "&fitted=yes";
    }
    
    if (document.getElementById("$").checked)
    {
      str += "&p1=yes";
    }
    
    if (document.getElementById("$$").checked)
    {
      str += "&p2=yes";      
    }
    
    if (document.getElementById("$$$").checked)
    {
      str += "&p3=yes";      
    }
    
    if (brand!="empty")
    {
      str += "&brand=" + brand;
    }
    
    if (material!="empty")
    {

      if (material == "wicking")
      {
        str += "&wicking=yes";
      }
      else if (material =="eco")
      {
        str += "&eco=yes";
      }
      else
      {
        str += "&material=" + material;
      }
    }
    
    if (imprint!="empty")
    {
      str += "&imprint=" + imprint;
    }
    
    if (size > 0)
    { 
      str += "&size=" + size;
      
      var i=0;
      var temp = "";
      var sizeAllow = false;
      for (i=0; i<size; i++)
      {
        temp = "size_" + i;
        if (document.getElementById(temp).checked)
        {
          str += "&size_" + i + "=" + document.getElementById('size_' + i).value;
          sizeAllow = true;
        }
      }
      
      if (sizeAllow)
      {
        str += "&sizeAllow=yes";
      }
    }
    
  }
  
  document.getElementById('resultsPanel').contentWindow.location.href = str;
}

function prodPage(id, r1, r2, r3)
{
  //alert (r1 + ", " + r2 + ", " + r3);
  window.open("http://www.undergroundshirts.com/?standard=true&p=prodPage&prod_id=" + id + "&r1=" + r1 + "&r2=" + r2 + "&r3=" + r3, "");
}

function showSearch()
{
  var asi = document.getElementById('prod_type_select').options[document.getElementById('prod_type_select').selectedIndex].value;
  var hide = document.getElementById("hide").value;
  if (hide == "yes")
  {
    if (asi!="Promo")
    {
      searchUnGrey(); 
    }
    document.getElementById("prod_type_select").disabled=false;
 
    document.getElementById("search_span").innerHTML = "";
    document.getElementById("showButton").value = "Show Advanced Search";
    document.getElementById("hide").value = "no";
    refreshResults();
  }
  else
  {
    searchGrey();
    document.getElementById("prod_type_select").disabled=true;
    document.getElementById("search_span").innerHTML = "<table id='advancedSearch'>" +
			                                                    "<tr>" +
				                                                    "<td><input id='keyword' type='text' value='' size='50'> <input type='button' value='Search' onclick='refreshResults()'></td>" +
			                                                    "</tr>" +
			                                                    "<tr>" +
				                                                    "<td><span id='keywordWarn'>This feature is only recommended for advanced users</span></td>" +
			                                                    "</tr>" +
		                                                    "</table>";
    document.getElementById("showButton").value = "Hide Advanced Search";
    document.getElementById("hide").value = "yes";
  }
  
}


function searchGrey()
{
  var size = document.getElementById('size_size').value;
  
  document.getElementById("style").disabled=true;
  document.getElementById("$").disabled=true;
  document.getElementById("$$").disabled=true;
  document.getElementById("$$$").disabled=true;
  document.getElementById("Men").disabled=true;
  document.getElementById("Women").disabled=true;
  document.getElementById("Youth").disabled=true;
  document.getElementById("Fitted").disabled=true;
  document.getElementById("brand").disabled=true;
  document.getElementById("material").disabled=true;
  document.getElementById("imprint").disabled=true;
  
  if (size > 0)
  { 
    var i=0;
    var temp = "";
    for (i=0; i<size; i++)
    {
      document.getElementById('size_' + i).disabled=true;
    }
  }
}

function searchUnGrey()
{
  var size = document.getElementById('size_size').value;
  
  document.getElementById("style").disabled=false;
  document.getElementById("$").disabled=false;
  document.getElementById("$$").disabled=false;
  document.getElementById("$$$").disabled=false;
  document.getElementById("Men").disabled=false;
  document.getElementById("Women").disabled=false;
  document.getElementById("Youth").disabled=false;
  document.getElementById("Fitted").disabled=false;
  document.getElementById("brand").disabled=false;
  document.getElementById("material").disabled=false;
  document.getElementById("imprint").disabled=false;
  
  if (size > 0)
  {
    var i=0;
    var temp = "";
    for (i=0; i<size; i++)
    {
      document.getElementById('size_' + i).disabled=false;
    }
  }
}

function resetSearch()
{
  var size = document.getElementById('size_size').value;
  
  document.getElementById("$").checked=false;
  document.getElementById("$$").checked=false;
  document.getElementById("$$$").checked=false;
  document.getElementById("Men").checked=false;
  document.getElementById("Women").checked=false;
  document.getElementById("Youth").checked=false;
  document.getElementById("Fitted").checked=false;
  
  document.getElementById('prod_type_select').selectedIndex = 0;
  searchUnGrey();
  document.getElementById('style').selectedIndex = 0;
  document.getElementById('brand').selectedIndex = 0;
  document.getElementById('material').selectedIndex = 0;
  document.getElementById('imprint').selectedIndex = 0;
  
  if (size > 0)
  {
    var i=0;
    var temp = "";
    for (i=0; i<size; i++)
    {
      document.getElementById('size_' + i).checked=false;
    }
  }
  
  var hide = document.getElementById("hide").value;
  
  if (hide == "yes")
  {
    showSearch();
  }
  
  refreshResults();
}

function cardFixVisa()
{
  document.getElementById('cvv2').size=3;
  document.getElementById('cnum').innerHTML = '<input type="text" name="cnumber1" size="4" maxlength="4"> - <input type="text" name="cnumber2" size="4" maxlength="4"> - <input type="text" name="cnumber3" size="4" maxlength="4"> -  <input type="text" name="cnumber4" size="4" maxlength="4">';
}

function cardFixMasterCard()
{
  document.getElementById('cvv2').size=3;
  document.getElementById('cnum').innerHTML = '<input type="text" name="cnumber1" size="4" maxlength="4"> - <input type="text" name="cnumber2" size="4" maxlength="4"> - <input type="text" name="cnumber3" size="4" maxlength="4"> -  <input type="text" name="cnumber4" size="4" maxlength="4">';
}

function cardFixDiscover()
{
  document.getElementById('cvv2').size=3;
  document.getElementById('cnum').innerHTML = '<input type="text" name="cnumber1" size="4" maxlength="4"> - <input type="text" name="cnumber2" size="4" maxlength="4"> - <input type="text" name="cnumber3" size="4" maxlength="4"> -  <input type="text" name="cnumber4" size="4" maxlength="4">';
}

function cardFixAmex()
{
  document.getElementById('cvv2').size=4;
  document.getElementById('cnum').innerHTML = '<input type="text" name="cnumber1" size="4" maxlength="4"> - <input type="text" name="cnumber2" size="6" maxlength="6"> - <input type="text" name="cnumber3" size="5" maxlength="5"><input type="hidden" name="cnumber4" value="">';
}

function getCampusDesign()
{
  var url = 'campus_designers_ajax.php';  

  var params = '';

  new Ajax.Request(url, {method: 'post', parameters: params,
    onSuccess: function(transport) 
    {
      var design = transport.responseText.split("|_|");

      document.getElementById('designer').innerHTML = design[0];
      document.getElementById('campus').innerHTML = design[1];
      document.getElementById('design_name').innerHTML = design[2];
      document.getElementById('inspiration').innerHTML = design[3];
      document.getElementById('campus_image').innerHTML = "<a href='campusdesigners/prod_page.php?id=" + design[5] + "' target='_blank'><img src='http://dev.undergroundshirts.com/designs/" + design[4] + "' height='175'></a>";
      document.getElementById('campus_id').innerHTML = "<a href='campusdesigners/prod_page.php?id=" + design[5] + "' target='_blank'>Click Here To View This Design</a>";
    }
  });
  
  window.setTimeout(getCampusDesign, 7000);
}

function captchaGet()
{
  var theVal = document.getElementById("security").value
  switch (theVal)
  {
    case "1":
    {
      return "polish";
      break;
    }
    case "2":
    {
      return "past";
      break;
    }
    case "3":
    {
      return "part";
      break;
    }
    case "4":
    {
      return "when";
      break;
    }
    case "5":
    {
      return "much";
      break;
    }
    case "6":
    {
      return "seed";
      break;
    }
    case "7":
    {
      return "soap";
      break;
    }
    case "8":
    {
      return "glove";
      break;
    }
    case "9":
    {
      return "sticky";
      break;
    }
    case "10":
    {
      return "soap";
      break;
    }
    case "11":
    {
      return "profit";
      break;
    }
    case "12":
    {
      return "bent";
      break;
    }
    case "13":
    {
      return "collar";
      break;
    }
    case "14":
    {
      return "where";
      break;
    }
    case "15":
    {
      return "weight";
      break;
    }
    case "16":
    {
      return "again";
      break;
    }
    case "17":
    {
      return "weight";
      break;
    }
    case "18":
    {
      return "boat";
      break;
    }
    case "19":
    {
      return "small";
      break;
    }
    case "20":
    {
      return "profit";
      break;
    }
    case "21":
    {
      return "sound";
      break;
    }
    case "22":
    {
      return "chin";
      break;
    }
    case "23":
    {
      return "flag";
      break;
    }
    case "24":
    {
      return "body";
      break;
    }
    case "25":
    {
      return "salt";
      break;
    }
    case "26":
    {
      return "birth";
      break;
    }
    case "27":
    {
      return "crime";
      break;
    }
    case "28":
    {
      return "false";
      break;
    }
    case "29":
    {
      return "sleep";
      break;
    }
    case "30":
    {
      return "square";
      break;
    }
    case "31":
    {
      return "canvas";
      break;
    }
    case "32":
    {
      return "mine";
      break;
    }
    case "33":
    {
      return "safe";
      break;
    }
    case "34":
    {
      return "mark";
      break;
    }
    case "35":
    {
      return "degree";
      break;
    }
    case "36":
    {
      return "bell";
      break;
    }
    case "37":
    {
      return "color";
      break;
    }
    case "38":
    {
      return "expert";
      break;
    }
    case "39":
    {
      return "rule";
      break;
    }
    case "40":
    {
      return "parcel";
      break;
    }
    case "41":
    {
      return "dergree";
      break;
    }
    case "42":
    {
      return "waste";
      break;
    }
    case "43":
    {
      return "after";
      break;
    }
    case "44":
    {
      return "army";
      break;
    }
    case "45":
    {
      return "moon";
      break;
    }
    case "46":
    {
      return "brain";
      break;
    }
    case "47":
    {
      return "news";
      break;
    }
    case "48":
    {
      return "silver";
      break;
    }
    case "49":
    {
      return "rain";
      break;
    }
    case "50":
    {
      return "stiff";
      break;
    }
    case "51":
    {
      return "horse";
      break;
    }
    case "52":
    {
      return "smile";
      break;
    }
    case "53":
    {
      return "shirt";
      break;
    }
    case "54":
    {
      return "this";
      break;
    }
    case "55":
    {
      return "grip";
      break;
    }
    case "56":
    {
      return "sharp";
      break;
    }
    case "57":
    {
      return "knot";
      break;
    }
    case "58":
    {
      return "neck";
      break;
    }
    case "59":
    {
      return "woman";
      break;
    }
    case "60":
    {
      return "smell";
      break;
    }
    case "61":
    {
      return "round";
      break;
    }
    case "62":
    {
      return "linen";
      break;
    }
    case "63":
    {
      return "same";
      break;
    }
    case "64":
    {
      return "right";
      break;
    }
    case "65":
    {
      return "adjust";
      break;
    }
    case "66":
    {
      return "jewel";
      break;
    }
    case "67":
    {
      return "bell";
      break;
    }
    case "68":
    {
      return "pocket";
      break;
    }
    case "69":
    {
      return "green";
      break;
    }
    case "70":
    {
      return "mother";
      break;
    }
    case "71":
    {
      return "mine";
      break;
    }
    case "72":
    {
      return "rice";
      break;
    }
    case "73":
    {
      return "loss";
      break;
    }
    case "74":
    {
      return "tail";
      break;
    }
    case "75":
    {
      return "foot";
      break;
    }
    case "76":
    {
      return "porter";
      break;
    }
    case "77":
    {
      return "spring";
      break;
    }
    case "78":
    {
      return "desire";
      break;
    }
    case "79":
    {
      return "screw";
      break;
    }
    case "80":
    {
      return "spade";
      break;
    }
    case "81":
    {
      return "bent";
      break;
    }
    case "82":
    {
      return "letter";
      break;
    }
    case "83":
    {
      return "glass";
      break;
    }
    case "84":
    {
      return "sugar";
      break;
    }
    case "85":
    {
      return "fear";
      break;
    }
    case "86":
    {
      return "every";
      break;
    }
    case "87":
    {
      return "muscle";
      break;
    }
    case "88":
    {
      return "right";
      break;
    }
    case "89":
    {
      return "rate";
      break;
    }
    case "90":
    {
      return "butter";
      break;
    }
    case "91":
    {
      return "sail";
      break;
    }
    case "92":
    {
      return "summer";
      break;
    }
    case "93":
    {
      return "snake";
      break;
    }
    case "94":
    {
      return "wheel";
      break;
    }
    case "95":
    {
      return "sheep";
      break;
    }
    case "96":
    {
      return "glove";
      break;
    }
    case "97":
    {
      return "poison";
      break;
    }
    case "98":
    {
      return "tooth";
      break;
    }
    case "99":
    {
      return "bucket";
      break;
    }
    case "100":
    {
      return "wood";
      break;
    }
    case "101":
    {
      return "great";
      break;
    }
    case "102":
    {
      return "school";
      break;
    }
    case "103":
    {
      return "sudden";
      break;
    }
    case "104":
    {
      return "wind";
      break;
    }
    case "105":
    {
      return "step";
      break;
    }
    case "106":
    {
      return "credit";
      break;
    }
    case "107":
    {
      return "pain";
      break;
    }
    case "108":
    {
      return "design";
      break;
    }
    case "109":
    {
      return "front";
      break;
    }
    case "110":
    {
      return "push";
      break;
    }
    case "111":
    {
      return "seem";
      break;
    }
    case "112":
    {
      return "cord";
      break;
    }
    case "113":
    {
      return "sound";
      break;
    }
    case "114":
    {
      return "scale";
      break;
    }
    case "115":
    {
      return "with";
      break;
    }
    case "116":
    {
      return "wind";
      break;
    }
    case "117":
    {
      return "cloth";
      break;
    }
    case "118":
    {
      return "screw";
      break;
    }
    case "119":
    {
      return "garden";
      break;
    }
    case "120":
    {
      return "west";
      break;
    }
    case "121":
    {
      return "judge";
      break;
    }
    case "122":
    {
      return "goat";
      break;
    }
    case "123":
    {
      return "animal";
      break;
    }
    case "124":
    {
      return "warm";
      break;
    }
    case "125":
    {
      return "join";
      break;
    }
    case "126":
    {
      return "turn";
      break;
    }
    case "127":
    {
      return "school";
      break;
    }
    case "128":
    {
      return "white";
      break;
    }
    case "129":
    {
      return "keep";
      break;
    }
    case "130":
    {
      return "basin";
      break;
    }
    case "131":
    {
      return "tooth";
      break;
    }
    case "132":
    {
      return "face";
      break;
    }
    case "133":
    {
      return "range";
      break;
    }
    case "134":
    {
      return "tight";
      break;
    }
    case "135":
    {
      return "nail";
      break;
    }
    case "136":
    {
      return "seem";
      break;
    }
    case "137":
    {
      return "female";
      break;
    }
    case "138":
    {
      return "public";
      break;
    }
    case "139":
    {
      return "potato";
      break;
    }
    case "140":
    {
      return "idea";
      break;
    }
    case "141":
    {
      return "snake";
      break;
    }
    case "142":
    {
      return "flower";
      break;
    }
    case "143":
    {
      return "narrow";
      break;
    }
    case "144":
    {
      return "still";
      break;
    }
    case "145":
    {
      return "hope";
      break;
    }
    case "146":
    {
      return "glass";
      break;
    }
    case "147":
    {
      return "lock";
      break;
    }
    case "148":
    {
      return "hand";
      break;
    }
    case "149":
    {
      return "face";
      break;
    }
    case "150":
    {
      return "fear";
      break;
    }
    case "151":
    {
      return "copper";
      break;
    }
    case "152":
    {
      return "debt";
      break;
    }
    case "153":
    {
      return "shoe";
      break;
    }
    case "154":
    {
      return "paint";
      break;
    }
    case "155":
    {
      return "butter";
      break;
    }
    case "156":
    {
      return "roll";
      break;
    }
    case "157":
    {
      return "blood";
      break;
    }
    case "158":
    {
      return "story";
      break;
    }
    case "159":
    {
      return "doubt";
      break;
    }
    case "160":
    {
      return "meat";
      break;
    }
    case "161":
    {
      return "offer";
      break;
    }
    case "162":
    {
      return "clean";
      break;
    }
    case "163":
    {
      return "memory";
      break;
    }
    case "164":
    {
      return "like";
      break;
    }
    case "165":
    {
      return "wrong";
      break;
    }
    case "166":
    {
      return "jump";
      break;
    }
    case "167":
    {
      return "amount";
      break;
    }
    case "168":
    {
      return "regret";
      break;
    }
    case "169":
    {
      return "free";
      break;
    }
    case "170":
    {
      return "crush";
      break;
    }
    case "171":
    {
      return "pull";
      break;
    }
    case "172":
    {
      return "dress";
      break;
    }
    case "173":
    {
      return "door";
      break;
    }
    case "174":
    {
      return "male";
      break;
    }
    case "175":
    {
      return "black";
      break;
    }
    case "176":
    {
      return "please";
      break;
    }
    case "177":
    {
      return "flag";
      break;
    }
    case "178":
    {
      return "fact";
      break;
    }
    case "179":
    {
      return "nose";
      break;
    }
    case "180":
    {
      return "taste";
      break;
    }
    case "181":
    {
      return "snake";
      break;
    }
    case "182":
    {
      return "cold";
      break;
    }
    case "183":
    {
      return "attack";
      break;
    }
    case "184":
    {
      return "crush";
      break;
    }
    case "185":
    {
      return "canvas";
      break;
    }
    case "186":
    {
      return "shame";
      break;
    }
    case "187":
    {
      return "book";
      break;
    }
    case "188":
    {
      return "wound";
      break;
    }
    case "189":
    {
      return "nation";
      break;
    }
    case "190":
    {
      return "fire";
      break;
    }
    case "191":
    {
      return "good";
      break;
    }
    default:
    {
      alert("Error: Invalid captcha generated.");
      return "";
      break;
    }
  }
}

