// JavaScript Document

function ck1(){
	document.getElementById("tr").style.display="";
}
function ck(){
		var pass="gcg008321";

		var pass2="GCG008321";

		if (document.getElementById("t").value==pass||document.getElementById("t").value==pass2) 
		{ 
		window.location="default.html";
		} 
		else
		{
			alert("Please enter your password!");
		}
}

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Company.value == "")
  {
    alert("Please enter a value for the \"Company\" field.");
    theForm.Company.focus();
    return (false);
  }

  if (theForm.Company.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Company\" field.");
    theForm.Company.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz???????????????????????????????????0123456789- \t\r\n\f";
  var checkStr = theForm.Company.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and whitespace characters in the \"Company\" field.");
    theForm.Company.focus();
    return (false);
  }

  if (theForm.Contact.value == "")
  {
    alert("Please enter a value for the \"Contact\" field.");
    theForm.Contact.focus();
    return (false);
  }

  if (theForm.Contact.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Contact\" field.");
    theForm.Contact.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz???????????????????????????????????0123456789- \t\r\n\f";
  var checkStr = theForm.Contact.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and whitespace characters in the \"Contact\" field.");
    theForm.Contact.focus();
    return (false);
  }

  if (theForm.Title.value == "")
  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.Title.focus();
    return (false);
  }

  if (theForm.Title.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Title\" field.");
    theForm.Title.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz???????????????????????????????????0123456789- \t\r\n\f";
  var checkStr = theForm.Title.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and whitespace characters in the \"Title\" field.");
    theForm.Title.focus();
    return (false);
  }

  if (theForm.Address1.value == "")
  {
    alert("Please enter a value for the \"Address1\" field.");
    theForm.Address1.focus();
    return (false);
  }

  if (theForm.Address1.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Address1\" field.");
    theForm.Address1.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz???????????????????????????????????0123456789- \t\r\n\f";
  var checkStr = theForm.Address1.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and whitespace characters in the \"Address1\" field.");
    theForm.Address1.focus();
    return (false);
  }

  if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"City\" field.");
    theForm.City.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz??????????????????????????????????? \t\r\n\f";
  var checkStr = theForm.City.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter and whitespace characters in the \"City\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.State.selectedIndex == 0)
  {
    alert("The first \"State\" option is not a valid selection.  Please choose one of the other options.");
    theForm.State.focus();
    return (false);
  }

  if (theForm.Zip.value == "")
  {
    alert("Please enter a value for the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  if (theForm.Zip.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  var checkOK = "0123456789-- \t\r\n\f";
  var checkStr = theForm.Zip.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only digit, whitespace and \"-\" characters in the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.Years_In_Business.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Years_In_Business\" field.");
    theForm.Years_In_Business.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.Number_of_Employees.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Number_of_Employees\" field.");
    theForm.Number_of_Employees.focus();
    return (false);
  }
  return (true);
}


var displayBar=true;
function switchBar(obj)
{
var tempobject=parent.document.getElementById("frame");
	if (displayBar)
	{
		tempobject.cols="0,10,*";
		displayBar=false;
		obj.src="1-1/admin_show_left.gif";
	}
	else{
		tempobject.cols="170,10,*";
		displayBar=true;
		obj.src="1-1/admin_hide_left.gif";
	}
}


document.oncontextmenu=noclick;
//document.onmousedown=noclick;
document.onselectstart=noclick;
function noclick(e){
if(window.event){window.event.returnValue=false;}
else{e.preventDefault();}
}



var menuObject=new Object;
function Changemenu(menu){
   
    if (menu==1)
	{
        if(document.getElementById("01").style.display=="")
		{
		document.getElementById("01").style.display="none";
		document.getElementById("menu_"+1).style.backgroundImage="url(1-1/menu_1.gif)";
		}
		else
		{
		document.getElementById("01").style.display="";
		document.getElementById("02").style.display="none";
		document.getElementById("03").style.display="none";
		document.getElementById("menu_"+1).style.backgroundImage="url(1-1/menu_2.gif)";
		document.getElementById("menu_"+2).style.backgroundImage="url(1-1/menu_1.gif)";
		document.getElementById("menu_"+3).style.backgroundImage="url(1-1/menu_1.gif)";
		
		
		}
   }
   
   
    if (menu==2)
	{
        if(document.getElementById("02").style.display=="")
		{
		document.getElementById("02").style.display="none";
		document.getElementById("menu_"+2).style.backgroundImage="url(1-1/menu_1.gif)";
		}
		else
		{
		document.getElementById("02").style.display="";
		document.getElementById("01").style.display="none";
		document.getElementById("03").style.display="none";
		document.getElementById("menu_"+1).style.backgroundImage="url(1-1/menu_1.gif)";
		document.getElementById("menu_"+2).style.backgroundImage="url(1-1/menu_2.gif)";
		document.getElementById("menu_"+3).style.backgroundImage="url(1-1/menu_1.gif)";
		
		
		
		}
   }
   

   
    if (menu==3)
	{
        if(document.getElementById("03").style.display=="")
		{
		document.getElementById("03").style.display="none";
		document.getElementById("menu_"+3).style.backgroundImage="url(1-1/menu_1.gif)";
		}
		else
		{
		document.getElementById("03").style.display="";
		document.getElementById("menu_"+3).style.backgroundImage="url(1-1/menu_2.gif)";
		
		
		document.getElementById("03").style.display="";
		document.getElementById("01").style.display="none";
		document.getElementById("02").style.display="none";
		document.getElementById("menu_"+1).style.backgroundImage="url(1-1/menu_1.gif)";
		document.getElementById("menu_"+2).style.backgroundImage="url(1-1/menu_1.gif)";
		document.getElementById("menu_"+3).style.backgroundImage="url(1-1/menu_2.gif)";
		
		
		}
   }
   
   
   

}
