//*************************************************
//*******  Initialization Section
//*************************************************
//MM_reloadPage(true);

function InsertCSSLINK() {
  document.write('<LINK rel="Stylesheet" type="text/css" href="StyleSheets/nsstyles.css">');
}



//*************************************************
//*******   Functions used to add the traffic
//*******   counter used w/ WebPosition Gold
//*************************************************
function TrafficCounter(pagename)
{
//Start Traffic Counter (do not remove this comment)
	if (location.href.charAt(4) != 's') {
		 // Do not run on secure servers, calling a non-secure counter
		document.write('<BR><IMG WIDTH=265 HEIGHT=29 SRC="http://www.trafficcount.com/cgi-local/counter.pl');
		document.write('?id=67507&ck=114222&domain=www.itadvant.com&page=' + pagename + '&url=' + escape(document.URL) + '&ref=' + document.referrer + '" BORDER=0>');
	}
}



//*************************************************
//*******   Functions that swaps images
//*************************************************

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true)
		with (navigator) {
			if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
				document.MM_pgW=innerWidth;
				document.MM_pgH=innerHeight;
				onresize=MM_reloadPage; }
		}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


function MM_findObj(n, d) {
  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);
	return x;
}

//*************************************************
//*******   Functions that swaps images
//*************************************************
function MM_swapImage() {
  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_swapImgRestore() {
  var i,x,a=document.MM_sr;
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//*************************************************
//*******   Functions that handle preload
//*************************************************
function MM_preloadImages() {
 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];
		}
	}
}

function PrintAnchorImage(href,mouseout,mouseover,src,border,height,width,alt,name)
{
	var HTMLString = '<IMG src="' + src + '" ' +
	                 'border="' + border + '" ' +
	                 'height="' + height + '" ' +
	                 'width="' + width + '" ' +
	                 'alt="' + alt + '" ' +
	                 'name="' + name + '">';
	if (href || mouseout || mouseover)
		HTMLString= '<a href="' + href + '" ' +
	            'onmouseout="' + mouseout + '" ' +
	            'onmouseover="' + mouseover + '">' +
	            HTMLString + '</a>';

	HTMLString = HTMLString + '<br>';
	document.write(HTMLString);
}

//*************************************************
//*******  Function used to change images on topbar
//*************************************************
function changeImages()
{
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = 'media/gifs/navigation/' + changeImages.arguments[i+1];
		}

	}
}

//*************************************************
//*******  Function used to change the contain of the DIV
//*******  element according to the sub menu desired
//*************************************************
function EditSubmenu(MenuName)
{
  var HTMLString = '<LINK rel="Stylesheet" type="text/css" href="StyleSheets/nsstyles.css"><SCRIPT language="JavaScript" type="text/javascript" src="StyleSheets/nsutils.js"></SCRIPT>';

    switch (MenuName) {
      case "Services":
        HTMLString = "<table width=\"650px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"8\"><tr><td valign=\"top\" width=\"36\" >&nbsp;</td>";
        HTMLString = HTMLString + "<td valign=\"top\" width=\"304\" align=\"right\"><img src=\"media/gifs/arrow.gif\" width=\"304\" height=\"14\" border=\"0\"></td>";
        HTMLString = HTMLString + "<td valign=\"middle\" align=\"center\" width=\"310\">";
//        HTMLString = HTMLString + "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">";
//        HTMLString = HTMLString + "<tr><td width=\"24%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Services&item=process\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image10','','media/gifs/navigation/processsub_mo.gif',1)\"><img name=\"Image10\" border=\"0\" src=\"media/gifs/navigation/processsub.gif\" width=\"45\" height=\"7\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"27%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Services&item=consulting\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image11','','media/gifs/navigation/consultingsub_mo.gif',1)\"><img name=\"Image11\" border=\"0\" src=\"media/gifs/navigation/consultingsub.gif\" width=\"60\" height=\"7\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"22%\" align=\"center\" valign=\"middle\"><a href=\"Index.po?doc=Services&item=software\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image12','','media/gifs/navigation/softwaresub_mo.gif',1)\"><img name=\"Image12\" border=\"0\" src=\"media/gifs/navigation/softwaresub.gif\" width=\"52\" height=\"7\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"27%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Services&item=mentoring\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image13','','media/gifs/navigation/mentoringsub_mo.gif',1)\"><img name=\"Image13\" border=\"0\" src=\"media/gifs/navigation/mentoringsub.gif\" width=\"56\" height=\"7\"></a></td></tr></table></td></tr></table>";
        break;

      case "Solutions":
      HTMLString = "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"8\"><tr><td valign=\"top\" width=\"36\">&nbsp;</td>";
      HTMLString = HTMLString + "<td valign=\"top\" width=\"304\" align=\"right\"><img src=\"media/gifs/SolutionsArrow.gif\" width=\"240\" height=\"14\" border=\"0\"></td>";
      HTMLString = HTMLString + "<td valign=\"middle\" align=\"center\" width=\"310\">";
//      HTMLString = HTMLString + "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">";
//      HTMLString = HTMLString + "<tr><td width=\"27%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Stories\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image11','','media/gifs/navigation/SuccessStories_mo.gif',1)\"><img name=\"Image11\" border=\"0\" src=\"media/gifs/navigation/SuccessStories.gif\" width=\"89\" height=\"7\"></a></td>";
//      HTMLString = HTMLString + "<td width=\"24%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Solutions&item=partners\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image10','','media/gifs/navigation/partnerssub_mo.gif',1)\"><img name=\"Image10\" border=\"0\" src=\"media/gifs/navigation/partnerssub.gif\" width=\"48\" height=\"7\"></a></td>";
//      HTMLString = HTMLString + "<td width=\"49%\" valign=\"middle\" align=\"center\">&nbsp;</td></tr></table>";
      break;

      case "News":
        HTMLString = "<table width=\"650px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"8\"><tr><td valign=\"top\" width=\"36\">&nbsp;</td>";
        HTMLString = HTMLString + "<td valign=\"top\" width=\"304\" align=\"right\"><img src=\"media/gifs/NewsArrow.gif\" width=\"185\" height=\"14\" border=\"0\"></td>";
        HTMLString = HTMLString + "<td valign=\"middle\" align=\"center\" width=\"310\">";
//        HTMLString = HTMLString + "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">";
//        HTMLString = HTMLString + "<tr><td width=\"17%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=News&Year=2000\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image10','','media/gifs/navigation/news2000sub_mo.gif',1)\"><img name=\"Image10\" border=\"0\" src=\"media/gifs/navigation/news2000sub.gif\" width=\"26\" height=\"8\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"17%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=News&Year=2001\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image11','','media/gifs/navigation/news2001sub_mo.gif',1)\"><img name=\"Image11\" border=\"0\" src=\"media/gifs/navigation/news2001sub.gif\" width=\"24\" height=\"8\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"33%\" align=\"center\" valign=\"middle\">&nbsp;</td>";
//        HTMLString = HTMLString + "<td width=\"33%\" valign=\"middle\" align=\"center\">&nbsp;</td></tr></table></td></tr></table>";
        break;

      case "Careers":
        HTMLString = "<table width=\"650px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"8\"><tr><td valign=\"top\" width=\"36\">&nbsp;</td>";
        HTMLString = HTMLString + "<td valign=\"top\" width=\"304\" align=\"right\"><img src=\"media/gifs/CareersArrow.gif\" width=\"137\" height=\"14\" border=\"0\"></td>";
        HTMLString = HTMLString + "<td valign=\"middle\" align=\"center\" width=\"310\">";
//        HTMLString = HTMLString + "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">";
//        HTMLString = HTMLString + "<tr><td width=\"32%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Careers&item=jobs\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image10','','media/gifs/navigation/jobssub_mo.gif',1)\"><img name=\"Image10\" border=\"0\" src=\"media/gifs/navigation/jobssub.gif\" width=\"76\" height=\"7\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"27%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Careers&item=benefits\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image11','','media/gifs/navigation/benefitssub_mo.gif',1)\"><img name=\"Image11\" border=\"0\" src=\"media/gifs/navigation/benefitssub.gif\" width=\"44\" height=\"7\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"22%\" valign=\"middle\" align=\"center\"><a href=\"Index.po?doc=Careers&item=apply\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image12','','media/gifs/navigation/applysub_mo.gif',1)\"><img name=\"Image12\" border=\"0\" src=\"media/gifs/navigation/applysub.gif\" width=\"28\" height=\"7\"></a></td>";
//        HTMLString = HTMLString + "<td width=\"19%\" valign=\"middle\" align=\"center\">&nbsp;</td></tr></table></td></tr></table>";
        break;

      case "Contact Us":
        HTMLString = "<table width=\"650px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"8\"><tr><td valign=\"top\" width=\"36\">&nbsp;</td>";
        HTMLString = HTMLString + "<td valign=\"top\" width=\"304\" align=\"right\"><img src=\"media/gifs/blank.gif\" width=\"137\" height=\"14\" border=\"0\"></td>";
        HTMLString = HTMLString + "<td valign=\"middle\" align=\"center\" width=\"310\"></tr></table>";
        break;
    }

    //pSubmenu.document.open();
//    pSubmenu.document.write(HTMLString);
//    pSubmenu.document.close();
}


//*************************************************
//*******  Function used to display/hide submenus
//*************************************************
function DisplaySubmenu(Visible)
{
    if (Visible) pSubmenu.visibility = "show"
    else pSubmenu.visibility = "hide";
}

function ShowSubMenu(name, mouseover) {
  changeImages(name, mouseover);
    EditSubmenu(name);
    //DisplaySubmenu(true);
}


//*************************************************
//*******  Function used to display hypperlink images
//*************************************************

function PrintImageLink(name, link, source, height, width, mouseover, mouseout)
{
	var HTMLString = ""

	if (link!='') {
            HTMLString = "<a alt='" + name + "' href='" + link +"' ";
	    if (mouseover!='')
	        HTMLString = HTMLString + " onmouseover='ShowSubMenu(\"" + name + '\",\"' + mouseover + "\")' onmouseout='changeImages(\"" + name + '\",\"' + mouseout + "\");'";
            HTMLString = HTMLString + ">"
	}

	HTMLString = HTMLString + "<img name='" + name + "' src='" + source + "' height='" + height + "' width='" + width + "' vspace='0' hspace='0' border='0'>"

	if (link!='') HTMLString = HTMLString + "</a>";
        document.write(HTMLString);
}

//*************************************************
//*******  Function used to display hypperlink text
//*************************************************
function PrintLink(name, link, blnActive, strTarget)
{
	var strLine;
	if (blnActive=="false")
		document.write("<nobr>" + name + "</nobr>");
	else
	{
		strLine = "<a href='" + link +"' ";
		if (strTarget)
                  strLine = strLine + " target='" + strTarget + "' ";
		strLine = strLine + " ><nobr>" + name + "</nobr></a>";
		document.write(strLine);
	}

}


//*************************************************
//*******  Function used to display images
//*************************************************
function PrintImage(name, source, height, width)
{
	var HTMLString = "<img name='" + name + " ' src='" + source +
					 "' height='" + height + "' width=" + width + " vspace='0' hspace='0' border='0'>";
	document.write(HTMLString);
}

//*************************************************
//*******  Function used to insert a separating row
//*************************************************
function WriteDevidingRow()
{
	document.write("<td width='8' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td width='158' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td bgcolor='#1b70a7' width='1' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td width='9' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td height='7' ><img border='0' height='7' src='images/1ptrans.gif'></td>");
}


//*************************************************
//*******  Function used to insert a simple search form
//*************************************************
/*
function AddSearchForm()
{
	document.write("<td width='8' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td align='left' width='158' height='53'>");
	var HTMLString='<form action="proxy.asp" method="get" name="QuickSearch" >' +
				   '<b>Search</b><br>' +
				   '<input name="edtKey"  tabindex="1" type="text" >' +
				   '<input name="btnSearch" tabindex="2" type="submit" value="GO"><br>' +
				   'Advanced Search...' +
				   '</form></td>';
	document.write(HTMLString);
	document.write("<td bgcolor='#1b70a7' width='1' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td width='9' height='7'><img border='0' height='1' src='images/1ptrans.gif' width='1'></td>");
	document.write("<td height='7' ><img border='0' height='53' width='435' src='/pub/images/topillus.jpg'></td>");
}
*/

//*************************************************
//*******  Function used to insert CR LF characters
//*************************************************
function InsertLineBreaks(count)
{
	for(var i=1;i<=count;i++)
		document.write('<br>');
}

function PrintSelectedOption(value, text) {
  document.write('<OPTION Value="' + value + '" SELECTED>' + text + '</OPTION>');
}

//*************************************************
//*******  Function used to print VALUE to the document
//*************************************************
function PrintValue(value)
{
	document.write(value);
}


//****************************************************
//****************************************************
//****************************************************
//*******  Function Used to Validate Application Forms
//****************************************************
//****************************************************
//****************************************************
  function ValidateCareer() {
    var retVal = false;

    //Validate First Name
    if (document.forms[0].FName.value=="") {
            alert("You must provide your First name.");
            document.forms[0].FName.focus();
            return false;
    }

    //Validate Last Name
//    if (frmSubmit.LName.value=="") {
//            alert("You must provide your Last name.");
//            frmSubmit.LName.focus();
//            return false;
//    }

    //Validate Phone Number
//    if (frmSubmit.Phone.value=="") {
//            alert("You must provide your phone number so we can contact you.");
//            frmSubmit.Phone.focus();
//            return false;
//    }

    //Validate Email
//    if (frmSubmit.Email.value=="") {
//            alert("You must provide your email address.");
//            frmSubmit.Email.focus();
//            return false;
//    }

    //Validate Address
//    if (frmSubmit.Address.value=="") {
//            alert("You must provide your address..");
//            frmSubmit.Address.focus();
//            return false;
//    }

    //Validate Education and Experiences
//    if (frmSubmit.Education.value=="" || frmSubmit.Experience.value=="" ) {
//            alert("You must provide both your education and experiences.");
//            frmSubmit.Education.focus();
//            return false;
//    }


    return true;
  }



  function ValidateContact() {
  var retVal = false;

  //Validate First Name
//  if (frmSubmit.FName.value=="") {
//          alert("You must provide your First name.");
//          frmSubmit.FName.focus();
//          return false;
//  }

  //Validate Last Name
//  if (frmSubmit.LName.value=="") {
//          alert("You must provide your Last name.");
//          frmSubmit.LName.focus();
//          return false;
//  }

  //Validate Phone Number
//  if (frmSubmit.Phone.value=="") {
//          alert("You must provide your phone number so we can contact you.");
//          frmSubmit.Phone.focus();
//          return false;
//  }

  //Validate Email
//  if (frmSubmit.Email.value=="") {
//          alert("You must provide your email address.");
//          frmSubmit.Email.focus();
//          return false;
//  }

//  return true;
}