<!--
if (self!=top)  {
  alert("Framing of this site is not permitted.");
  parent.top.document.location.href="http://www.oneplugsystems.com";
}
var message="Copyright © One Plug Systems, LLC. 1996 - 2009. All rights reserved.";
if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
function click(e)
{
  if(document.all)  {
    if (event.button == 2) {
				alert(message);
        return false;}}
  if(document.layers)  {
    if (e.which == 3) {
				alert(message);
        return false;}}
}
var swIE=(navigator.appName == "Microsoft Internet Explorer");
var swNN=((navigator.appName == "Netscape")&&(document.layers));
if(swIE||swNN)
  version=parseInt(navigator.appVersion);
else
  version=0;
if (version >= 3) {
	ColumnOneOff = new Image();
	ColumnOneOff.src = "/images/banner1bw.jpg";
	ColumnOneOn = new Image();
	ColumnOneOn.src = "/images/Banner1Color.jpg";
	ColTwoOff = new Image();
	ColTwoOff.src = "/images/smartgridBW.jpg";
	ColTwoOn = new Image();
	ColTwoOn.src = "/images/smartgridColor.jpg";



	ColThreeOff = new Image();
	ColThreeOff.src = "/images/PackageHandlingBW.jpg";
	ColThreeOn = new Image();
	ColThreeOn.src = "/images/PackageHandlingColor.jpg";


  ColFOff = new Image();
  ColFOff.src = "/images/MDUBW.jpg";
  ColFOn = new Image();
  ColFOn.src = "/images/MDUColor.jpg";




  ContinueOff = new Image();
  ContinueOff.src = "/images/continueoff.gif";
  ContinueOn = new Image();
  ContinueOn.src = "/images/continueon.gif";
  CharCountOff = new Image();
  CharCountOff.src = "/images/charcountoff.gif";
  CharCountOn = new Image();
  CharCountOn.src = "/images/charcounton.gif";
}
function ImgOn(imgName,imgSrc) {
if (version >= 3) {
    document.images[imgName].src=eval(imgSrc+".src");
  }
}
function ImgOff(imgName,imgSrc) {
if (version >= 3) {
    document.images[imgName].src=eval(imgSrc+".src");
  }
}
function CharCount() {
  var charString=document.sForm.tComments.value;
  alert(charString.length + " Characters.");
  document.sForm.tComments.focus()
  }
function swCancel(OP,ID,KEY) {
  if(confirm("Confirm Cancel ?"))  {
    document.rForm.OP.value=OP;
    document.rForm.ID.value=ID;
    document.rForm.KEY.value=KEY;
    document.rForm.submit();
  }
  else
    return;
}
function swSubmitXX(OOP, TID) {
  var checkOK = "0123456789.-() ";
  var numOK = "0123456789";
  var alphaOK="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  var tnum = "";
  var cnum = "";
  var missinginfo = "";
  isValid = true;
  var tnum;
  var Phone1 = document.sForm.tPhone1.value;
  document.sForm.hPhone1.value = "";
  var Phone2 = document.sForm.tPhone2.value;
  document.sForm.hPhone2.value = "";
  var FAX = document.sForm.tFAX.value;
	document.sForm.hFAX.value = "";
  if(document.sForm.tCompanyName.value=="")
    missinginfo += "\n     -  Company Name";
  if(document.sForm.tFirstName.value == "")
    missinginfo += "\n     -  Contact First Name";
  if(document.sForm.tLastName.value == "")
    missinginfo += "\n     -  Contact Last Name";

  if(Phone1.length > 0)  {
    tnum="";
    for(i=0; i < Phone1.length; i++)  {
      ch = Phone1.charAt(i);
      for(j=0; j<checkOK.length; j++)
        if(ch==checkOK.charAt(j))
          break;
      if(j==checkOK.length) {
        missinginfo += "\n     -  Phone 1 Invalid Character(s)";
        isValid=false;
        break;
      }
    }
    if(isValid==true) {
      for(i=0; i<Phone1.length; i++) {
        ch=Phone1.charAt(i);
        for(j=0; j<numOK.length; j++)
          if(ch==numOK.charAt(j)) {
            tnum += Phone1.charAt(i);
            break;
          }
      }
      if(tnum.length < 7)
        missinginfo += "\n     -  Phone 1 Invalid Number";
      else
        if(tnum.length == 7 )
          missinginfo += "\n     -  Phone 1 Missing Area Code";
        else
          if(tnum.length == 10 )
            document.sForm.hPhone1.value=tnum.substring(0,3) +"."+ tnum.substring(3,6) +"."+ tnum.substring(6,10);
          else
            if(tnum.length == 11)
              document.sForm.hPhone1.value = tnum.substring(0,2)+"."+tnum.substring(2,4)+"."+tnum.substring(4,7)+"."+tnum.substring(7,11);
            else
              if(tnum.length == 12)
                document.sForm.hPhone1.value = tnum.substring(0,2)+"."+tnum.substring(2,5)+"."+tnum.substring(5,8)+"."+tnum.substring(8,12);
              else
                missinginfo += "\n     -  Phone 1 Invalid Number";
    }
  }

  if(Phone2.length > 0)  {
    tnum="";
    for(i=0; i < Phone2.length; i++)  {
      ch = Phone2.charAt(i);
      for(j=0; j<checkOK.length; j++)
        if(ch==checkOK.charAt(j))
          break;
      if(j==checkOK.length) {
        missinginfo += "\n     -  Phone 2 Invalid Character(s)";
        isValid=false;
        break;
      }
    }
    if(isValid==true) {
      for(i=0; i<Phone2.length; i++) {
        ch=Phone1.charAt(i);
        for(j=0; j<numOK.length; j++)
          if(ch==numOK.charAt(j)) {
            tnum += Phone2.charAt(i);
            break;
          }
      }
      if(tnum.length < 7)
        missinginfo += "\n     -  Phone 2 Invalid Number";
      else
        if(tnum.length == 7 )
          missinginfo += "\n     -  Phone 2 Missing Area Code";
        else
          if(tnum.length == 10 )
            document.sForm.hPhone2.value=tnum.substring(0,3) +"."+ tnum.substring(3,6) +"."+ tnum.substring(6,10);
          else
            if(tnum.length == 11)
              document.sForm.hPhone2.value = tnum.substring(0,2)+"."+tnum.substring(2,4)+"."+tnum.substring(4,7)+"."+tnum.substring(7,11);
            else
              if(tnum.length == 12)
                document.sForm.hPhone2.value = tnum.substring(0,2)+"."+tnum.substring(2,5)+"."+tnum.substring(5,8)+"."+tnum.substring(8,12);
              else
                missinginfo += "\n     -  Phone 2 Invalid Number";
    }
  }
  if(document.sForm.hPhone1.value == "" && document.sForm.hPhone2.value == "")
    missinginfo += "\n     -  Contact Phone Number";
  if(FAX.length > 0)  {
    tnum="";
    for(i=0; i < Phone1.length; i++)  {
      ch = FAX.charAt(i);
      for(j=0; j<checkOK.length; j++)
        if(ch==checkOK.charAt(j))
          break;
      if(j==checkOK.length) {
        missinginfo += "\n     -  FAX Invalid Character(s)";
        isValid=false;
        break;
      }
    }
    if(isValid==true) {
      for(i=0; i<FAX.length; i++) {
        ch=FAX.charAt(i);
        for(j=0; j<numOK.length; j++)
          if(ch==numOK.charAt(j)) {
            tnum += FAX.charAt(i);
            break;
          }
      }
      if(tnum.length < 7)
        missinginfo += "\n     -  Invalid FAX Number";
      else
        if(tnum.length == 7 )
          missinginfo += "\n     -  FAX Missing Area Code";
        else
          if(tnum.length == 10 )
            document.sForm.hFAX.value=tnum.substring(0,3) +"."+ tnum.substring(3,6) +"."+ tnum.substring(6,10);
          else
            if(tnum.length == 11)
              document.sForm.hFAX.value = tnum.substring(0,2)+"."+tnum.substring(2,4)+"."+tnum.substring(4,7)+"."+tnum.substring(7,11);
            else
              if(tnum.length == 12)
                document.sForm.hFAX.value = tnum.substring(0,2)+"."+tnum.substring(2,5)+"."+tnum.substring(5,8)+"."+tnum.substring(8,12);
              else
                missinginfo += "\n     -  Invalid FAX Number";
    }
  }
  var tMail1=document.sForm.teMail1.value.toLowerCase();
  var tMail2=document.sForm.teMail2.value.toLowerCase();
  if(tMail1 == "") {
    missinginfo += "\n     -  eMail address";
    missinginfo += "\n          -FORM: user@home.com";
  }
	else
  if(tMail2 == "") {
    missinginfo += "\n     -  Confirm eMail address";
    missinginfo += "\n          -FORM: user@home.com";
  }
	else
  if((tMail1.length < 5) || (tMail1.indexOf('@') == -1) || (tMail1.indexOf('.') == -1)) {
    missinginfo += "\n     -  Invalid eMail address";
    missinginfo += "\n          -FORM: user@home.com";
  }
	else
  if(document.sForm.teMail1.value != document.sForm.teMail2.value) {
    missinginfo += "\n     -  eMail Address not confirmed";
    missinginfo += "\n        - Please confirm your eMail Address";
  }
	if(document.sForm.tCity.value=="")
    missinginfo += "\n     -  City Name";
  if(document.sForm.tCountry.value=="")
    missinginfo += "\n     -  Country";
  else
  {
    var CountryCode=document.sForm.tCountry.value.toUpperCase();
    if(CountryCode.length<2)
      missinginfo += "\n     -  Invalid Country";
    else
    {
      isValid=true;
      for(i=0; i < CountryCode.length; i++)
      {
        ch = CountryCode.charAt(i);
        for(j=0;j<alphaOK.length; j++)
          if(ch==alphaOK.charAt(j))
            break;
        if(j == alphaOK.length) {
          missinginfo += "\n     -  Invalid Country Code";
          isValid=false;
        break;
        }
      }
     if(isValid==true)
      if(CountryCode=="US" || CountryCode=="USA")
        if(!document.sForm.lStates.selectedIndex)
          missinginfo += "\n     -  State";
    }
  }
	//  Section III
  if(document.sForm.tPassWord1.value == "") {
    missinginfo += "\n     -  Login Password";
  }
  if(document.sForm.tPassWord1.length < 8) {
    missinginfo += "\n     -  Invalid Password";
  }
  if(document.sForm.tPassWord1.length > 12) {
    missinginfo += "\n     -  Invalid Password";
  }
	if(document.sForm.tPassWord1.value != document.sForm.tPassWord2.value) {
    missinginfo += "\n     -  Passwords do not Match";
    missinginfo += "\n        - Please confirm your password";
  }
  if (missinginfo == "") {
		if(!document.sForm.cAcceptTOS.checked)
  	  missinginfo += "\n     -  CyberInterview Terms of Service\n";
  	if (missinginfo != "") {
    	missinginfo ="____________________________________________\n" +
	    "         You must read and agree to be bound by:\n" +
  	  missinginfo + "\n____________________________________________" +
    	"\nPlease indicate your compliance by checking the box!";
	    alert(missinginfo);
  	  document.sForm.cAcceptTOS.focus();
    	return;
  }
	}
	if (missinginfo != "") {
    missinginfo ="_____________________________\n" +
    "You failed to correctly provide your:\n" +
    missinginfo + "\n_____________________________" +
    "\nPlease re-enter and submit again!";
    alert(missinginfo);
    return;
  }
  document.sForm.TID.value = TID;
  document.sForm.OOP.value = OOP;
  document.sForm.submit();
}
function swSubmit(OOP) {
  document.tForm.OOP.value = OOP;
  document.tForm.submit();
}
//-->
