
<!--//

function initVars() {

NS = (document.layers)
IE = (!NS)
NS6 = (!document.layers && !document.all)
IE5 = (navigator.appVersion.indexOf("5.")!=-1);
IE4 = (navigator.appVersion.indexOf("4.")!=-1);
Macintosh = navigator.userAgent.indexOf('Mac')>0;

coll = "";
styleObj = "";
defWidth = 200;

if(IE) {
	coll="all."
	styleObj=".style"
}
}



function getObject(obj) {
	if(typeof obj == "string")
		return eval("document."+coll+obj+styleObj);
	return obj;
}

function placeAt(obj, x,y) {
	o = getObject(obj)
	if(IE) {
		o.pixelLeft = x;
		o.pixelTop = y;
	} else {
		o.moveTo(x,y);
	}
}

function nsmoveto(x,y) {
  this.l.moveTo(x,y)
}

function nsresizeto(w,h) {
	this.l.resizeTo(w,h);
}

function ieresizeto(w,h) {
	this.l.style.pixelWidth = w;
	this.l.style.pixelHeight = h;
	//alert("Rezose. H="+	this.l.style.pixelHeight+" h="+h);
}

function displaceBy(obj, dx,dy) {
	o = getObject(obj)
	if(IE) {
		o.pixelLeft += dx;
		o.pixelTop += dy;
	} else {
		o.moveBy(dx,dy);
	}
}	

function zetIndex(obj, z) {
	getObject(obj).zIndex = z;
}

function setBGcolor(color) {
	o = getObject(this)
	if(IE)
		o.backgroundColor = color;
	else
		o.bgColor = color;
}

function show() {
	getObject(this).visibility = "visible";
}

function hide(obj) {
	getObject(obj).visibility = "hidden";
}

function getX(obj) {
	o = getObject(obj)
	if(IE) {
		return o.pixelLeft;
	} else {
		return o.left;
	}
}

function getY(obj) {
	o = getObject(obj)
	if(IE) {
		return o.pixelTop;
	} else {
		return o.top;
	}
}

function ieshow() {
	this.l.style.visibility = "visible";
}

function iehide() {
	this.l.style.visibility = "hidden";
}

function iesetBGcolor(col) {
	this.l.style.backgroundColor = col;
}

function iemoveto(x,y) {
	if(NS6) {
		o = this.l.style;
		o.left = x;
		o.top = y;
	} else {
		o=this.l.style;
		o.pixelLeft = x;
		o.pixelTop = y;
	}
}	

function nsshow() {
  this.l.visibility = "show";
}

function nshide() {
  this.l.visibility = "hide";
}

function nssetBGcolor(col) {
  this.l.bgColor = col;
}

function nssetmouseover(func) {
  this.l.onmouseover = nsmouseover
  this.mouseover = func
}

function nsmouseover() {
  this.f.mouseover();
}

function nssetmouseout(func) {
  this.l.onmouseout = nsmouseout
  this.mouseout = func
}

function nsmouseout() {
  this.f.mouseout();
}

function iegetwidth() {
	return this.l.clientWidth;
}

function nsgetwidth() {
  return this.l.clip.width;
}

function nswrite(txt) {
	this.l.document.write(txt);
	this.l.document.close();
}
function iewrite(txt) {
	document.write(txt);
}
function foo() {}

function Flak(parent) {
	this.l = l = new Layer(defWidth, parent)
	l.f = this
	this.show = nsshow
	this.hide = nshide
	this.setBGcolor = nssetBGcolor
	this.moveTo = nsmoveto
	this.resizeTo = nsresizeto
	this.setmouseover = nssetmouseover
	this.setmouseout = nssetmouseout
	this.getwidth = nsgetwidth
	this.write = nswrite
	this.end = foo
}

ieids = 12452
function FlakIE() {
	this.id = "a"+ieids;
	document.write('<div id="'+this.id+'" style="position:absolute;visibility:inherit;">')
	ieids++;
	this.end = endIEflak
	this.show = ieshow
	this.hide = iehide
	this.setBGcolor = iesetBGcolor
	this.moveTo = iemoveto
	this.write = iewrite
	this.resizeTo = ieresizeto
	this.setmouseover = nssetmouseover
	this.setmouseout = nssetmouseout
	this.getwidth = iegetwidth
}

function endIEflak() {
	document.write("</div>");
	//this.l = eval("document.all."+this.id)
	if(NS6) 
		this.l = document.getElementById(this.id);
	else
		this.l = eval("document.all."+this.id)
	this.l.f = this
}


// Handling of image rollover
function initVars2() {
im = new Array(
  "home","about","opinion","consulting","training","resources","pressroom","career","employees","home","Community"
)
currbar = null;
currhilite = null;
shown = null
overbar = null;
showing = null;
hidecount = 0;

preloadImages()
}


function preloadImages() {
	for(i=0;i<im.length;i++) {
		eval("fooobj"+i+" = new Image()");
		eval("fooobj"+i+".src = 'http://<%= Request.ServerVariables("SERVER_NAME")%>/images/nav/" + im[i]+"_on.gif'");
	}
}
initialized = false;
function rollover(i) {
	if(initialized == true) {
		showMenu(i);
		shown = i;
	}
}

function rollout(i) {
	if(initialized == true) {
	  shown = null;
	  leftmenu();
	}
}

function leftmenu() {
  hidecount++;
  setTimeout("hidebar2()", 2000)
}

function hidebar2(i) {
  hidecount--;
  if(hidecount==0 && shown == null && overbar == null)
		showCurrentPos();
}


function setImage(i, img) {
  o = document.images["meny"+i]
  if(o != null)
     o.src = "http://<%= Request.ServerVariables("SERVER_NAME")%>/images/nav/"+img
}


// New API functions


function showMenu(i) {
	showBar(i);
	hiliteImage(i);
}

// Show bar number i, hiding any others
function showBar(i) {
	hidecurrbar()
	if(i != null && i!= 0) {
		bars[i].show();
		currbar = i;
	}
}

function hideShowing() {
  hideChild(currbar, showing);
}

function hideChild(bar, child) {
	var img, ims,td;
  if(bar == 0)
  		return;
  	if(child == null) {
  		alert("child is null");
  		return;
  	}
  if(IE) {
  	if(NS6) {
  		//alert("td"+bar+"_"+child +"=")
		//alert(eval("td"+bar+"_"+child))
  		td = document.getElementById("td"+bar+"_"+child);
  	} else { 
    	td = eval("document.all.td"+bar+"_"+child);
    td.style.backgroundColor = "#c4bdb9";  //commented by Kate 
    }
    if(NS6) {
    	td.firstChild.style.color = "black";
    } else {
    td.children[0].style.color = "black";  //commented by Kate 
	}
    // In case of image?
    if(bars[bar].images[child]  != null) {

    	// An image
   	 if(NS6) {
  			img = document.getElementById("mi"+bar+"_"+child);
  		} else {
   	 	img = eval("document.all.mi"+bar+"_"+child);
    	}
    	ims = "http://<%= Request.ServerVariables("SERVER_NAME")%>/images/nav/"+ bars[bar].images[child] +"_off.gif";
    	img.src = ims;
    }

  } else {
    bars[bar].children[child].f2.hide();
  }
}

function showChild(bar, child) {
  var img, ims;
  if(bar == 0) 
		return;
	if(child == null) {
			alert("Child in show is null");
			return;
	}
  if(IE) {
  	if(NS6) {
  		td = document.getElementById("td"+bar+"_"+child);
  	} else { 
    	td = eval("document.all.td"+bar+"_"+child);
    	 td.style.backgroundColor = "#8e826a";   //commented by Kate 
    }
     
    if(NS6) {
    	td.firstChild.style.color = "white";
    } else {
    	td.children[0].style.color = "white";    //commented by Kate 
    }

    // In case of image?
    if(bars[bar].images[child]  != null) {

    	// An image
   	 if(NS6) {
  			img = document.getElementById("mi"+bar+"_"+child);
  		} else {
   	 	img = eval("document.all.mi"+bar+"_"+child);
    	}
    	ims = "http://<%= Request.ServerVariables("SERVER_NAME")%>/images/nav/"+ bars[bar].images[child] +"_on.gif";
    	img.src = ims;
    }
    
  } else {
    bars[bar].children[child].f2.show();
  } 
}

currbar = null;

function hidecurrbar() {
	if(currbar != null) {
		if(showing != null) {
			hideChild(currbar, showing);				
			showing = null;
		}
		bars[currbar].hide();
	}
	currbar = null;
}

// Hilite menu item b in menu a
function showmenuPos(a,b) {
	hiliteImage(a);
	if(a > 0) {
	showBar(a);
	if(b > 0)
	showSubItem(b);
	} else 
		hidecurrbar();
}

function showSubItem(i) {
	bar = bars[currbar];
	showChild(currbar, i)
	if(showing != null && showing != i) {
		hideChild(currbar, showing);
	}
	showing = i;
}

function showCurrentPos() {
	showmenuPos(posA, posB);
}


// Hilites given image on the toolbar, removing active hilite.
// If i == null, no images are hilited.
function hiliteImage(i) {
  hidecurr()
  if(i == null) 
	return;
  toggleImage(i, true);
}

// unhilites current hilited image
function hidecurr() {
	if(currhilite != null)
		toggleImage(currhilite, false);
}

function toggleImage(i, bool) {
	img = im[i] + ((bool)?"_on.gif":"_off.gif");
	setImage(i, img);
   currhilite = (bool)?i:null;
}


// home
menu0 = new Array(
	//"Contact","http://<%= Request.ServerVariables("SERVER_NAME")%>/Locations/Contact.asp"
)

// About NTSI
menu1 = new Array(
	"Services","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/About.asp",			
	"Unique Difference","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/UniqueDiff.asp",
	"Domain Expertise","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Expertise.asp",
	"People and Culture","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Culture.asp",
	"Quality","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Quality.asp",
	"Timeline","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Timeline.asp",
	"Testimonials","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Testimonials.asp",
	"Customers","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Customers.asp",
	"Affilations","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/Affilations.asp"
	
//"History","http://<%= Request.ServerVariables("SERVER_NAME")%>/AboutNTSI/History.asp",
)
//Opinion
menu2 = new Array(
	 
)
// Consulting
menu3 = new Array(
	"Unique Difference","http://<%= Request.ServerVariables("SERVER_NAME")%>/Consulting/UniqueDiff.asp",			
	"Domain Expertise","http://<%= Request.ServerVariables("SERVER_NAME")%>/Consulting/Expertise.asp",
	"Sample Resume","http://<%= Request.ServerVariables("SERVER_NAME")%>/Consulting/Resume.asp",
	"Contact Us","http://<%= Request.ServerVariables("SERVER_NAME")%>/Locations/Contact.asp"
	
 //"Engagement Descriptions","http://<%= Request.ServerVariables("SERVER_NAME")%>/Consulting/Engagement.asp",
)
// Training
menu4 = new Array(
 	//"Unique Difference","http://<%= Request.ServerVariables("SERVER_NAME")%>/Training/UniqueDiff.asp",			
	//"Onsite Training","http://<%= Request.ServerVariables("SERVER_NAME")%>/Training/Training.asp",
	//"Course Customization","http://<%= Request.ServerVariables("SERVER_NAME")%>/Training/Customization.asp",
	"Courses","http://<%= Request.ServerVariables("SERVER_NAME")%>/Training/Courses.asp",
	"Course Schedule","http://<%= Request.ServerVariables("SERVER_NAME")%>/Training/Classes.asp",
	"Registration","http://<%= Request.ServerVariables("SERVER_NAME")%>/Training/Register.asp"
 
)
// Resources
menu5 = new Array(
 	"Developer Links","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/Links.asp",
	"White Papers","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/WhitePapers.asp",
	"Free Downloads","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/Download.asp",
	"Registered Downloads","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/Registered.asp",
	"Premier Downloads","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/Premier.asp"		
	//"Source Code Samples","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/SourceCode.asp", 
	// Will be changed soon to only have tools and tutorials (and links?)
	//"Tools","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/Tools.asp"
	//"Tutorials","http://<%= Request.ServerVariables("SERVER_NAME")%>/Resources/Tutorials.asp"
)
// Pressroom
menu6 = new Array(
 	"News Releases","http://<%= Request.ServerVariables("SERVER_NAME")%>/Pressroom/Press.asp",
	//"Newpaper Clippings","http://<%= Request.ServerVariables("SERVER_NAME")%>/Pressroom/Clippings.asp",	
	"NewTech in the News","http://<%= Request.ServerVariables("SERVER_NAME")%>/Pressroom/intheNews.asp"
 
)
// Career
menu7 = new Array(
 	//"Unique Difference","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/UniqueDiff.asp",
	//"Getting Started","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/GettingStarted.asp",	
	//"NewTech Quiz","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Quiz.asp",
	//"Testimonials","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Testimonials.asp",
	//"Night Training","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/NightTraining.asp",
	//"Events","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Events.asp",
	//"Advancement","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Advancement.asp",
	//"Benefits","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Benefits.asp",
	//"Pension","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Pension.asp",
	//"R.G.I.","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Revenue.asp",
	"Positions","http://<%= Request.ServerVariables("SERVER_NAME")%>/Career/Positions.asp"
 
)

// Employees
menu8 = new Array(
 	//"Timesheet","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Downloads/NewTechTimesheet.zip",
	//"Employee Manual","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Manual.asp",	
	//"Expense Report","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Downloads/NewTechExpenseReport.zip",
	//"Bulletins Archive","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Bulletins.asp",
	//"Policys","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Policys.asp",
	//"documents","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Trainers/trainers.asp",
	//"Web-Mail","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/webmail.asp",
	//"Events","http://<%= Request.ServerVariables("SERVER_NAME")%>/Employees/Events/Index.asp"
 
)
// home
menu9 = new Array(
	"Connecticut","http://<%= Request.ServerVariables("SERVER_NAME")%>/Locations/Connecticut.asp",			
	"Massachusetts","http://<%= Request.ServerVariables("SERVER_NAME")%>/Locations/Massachusetts.asp",
	"Rhode Island","http://<%= Request.ServerVariables("SERVER_NAME")%>/Locations/RhodeIsland.asp",
	"Contact","http://<%= Request.ServerVariables("SERVER_NAME")%>/Locations/Contact.asp"
)
//Community
menu10 = new Array(
	"New Haven Chamber","http://<%= Request.ServerVariables("SERVER_NAME")%>/Community/GNHCCIT.asp",
	"New Tech Forum", "http://<%= Request.ServerVariables("SERVER_NAME")%>/Community/NewtechForum.asp"
)
menus = 11


 function dfmover() {
 showSubItem(this.num)
 showing = this.num
}

function dfmout() {
 showing = null;
 this.hide()
}

function ompunkt(parent, text,x,y, link) {
 if(IE)
		f1 = new FlakIE();
 else
		f1 = new Flak(parent.l);
if(text.substring(0,4) == "img_") {
	text = text.substring(4);
	text2 = '<img src="http://<%= Request.ServerVariables("SERVER_NAME")%>/images/nav/'+text+'_off.gif" border=0>';
	text3 = '<img src="http://<%= Request.ServerVariables("SERVER_NAME")%>/images/nav/'+text+'_on.gif" border=0>';
} else {
	text2 = text; text3 = text;
}
f1.write('<table cellpadding="0" cellspacing="0" height="18" border="0" valign="middle"><td><span class="menu">&nbsp;'+text2+'&nbsp;</span></td></table>');
 //f1.write('<span class="menu">&nbsp;'+text2+'&nbsp;</span>');
 f1.end()
 f1.setBGcolor("#c4bdb9")
 f1.moveTo(x,y)
 f1.resizeTo(f1.getwidth(), 18)
 f1.setmouseover(dfmover)
 f1.parent = parent
 if(IE)
      f2 = new FlakIE();
 else
      f2 = new Flak(parent.l);
 //f2.write('<span class="hilite">&nbsp;<a class="hilite" href="'+link+'">'+text3+'</a>&nbsp;</span>');
 f2.write('<table cellpadding="0" cellspacing="0" height="18" border="0" valign="middle"><td><span class="hilite">&nbsp;<a class="hilite" href="'+link+'">'+text3+'</a>&nbsp;</span></td></table>');
 f2.end()
 f2.setBGcolor("#8e826a")
 f2.hide()
 f2.resizeTo(f2.getwidth(), 18)
 f2.moveTo(x,y)
 // f2.moveTo(x, y)
 f2.link = link
 f2.setmouseout(dfmout)
 f1.f2 = f2
 f2.f1 = f1
 f1.width = f1.getwidth();
 if(f1.width == 0) {
      // Internet explorer bug workaround
      f1.width = 70;
 }
 return f1
}

function nsinit() {
	if(document.layers) {
	  initVars();
	  initVars2();

	   y = document.meny1.y + document.meny1.height
	   //makemenu(8,y)   CHANGED
	   makemenu(0,y)
	   showCurrentPos();
	   initialized = true;
	}
}

function barover() {
	overbar = this.num;
}

function barout() {
	overbar = null;
	leftmenu();
}

function makemenu(ox,y) {
 bars = new Array()
 for(i=1;i<menus;i++) {
		m = eval("menu"+i);
		if(IE) {
		  bar = new FlakIE();
                  bar.end();
		} else {
		  bar = new Flak(window);
		}
		bars[i] = bar
		x = 0
		bar.children = new Array();

	bar.antChildren = m.length;
   for(n=1,p=0;p<m.length;n++) {
      title = m[p++];
      link = m[p++];
      knapp = ompunkt(bar, title, (IE)?x+ox:x, (IE)?y:0, link);
      x += knapp.width;
		knapp.num = n;
      knapp.l.visibility = "inherit"
      bar.children[n] = knapp;
   }
		bar.setBGcolor("#c4bdb9")
		//bar.setBGcolor("blue")
		bar.moveTo(ox,y)
		bar.resizeTo(800,18)
		bar.num = i;
		bar.setmouseover(barover);
		bar.setmouseout(barout);
   bar.hide()
 }
}

function makemenuIE(x,y) {
  var isimage, imagename;
  bars = new Array()
  klasse = "meny"
  for(i=1;i<menus;i++) {
      m = eval("menu"+i);
      bar = bars[i] = new FlakIE();
      content =  '<table height="18" id="menuT'+i+'" cellpadding="0" cellspacing="0">';
      bar.images = new Array();
		bar.antChildren = m.length;
      for(p=0,l=1;p<m.length;l++) {
      	title = m[p++];
		if(title.substring(0,4) == "img_") {
			imagename = title.substring(4);
			bar.images[l]  = imagename;
			title = "/images/menu/" + imagename ;
			//title = '<img onmouseout="this.src=\''+title+'_off.gif\'" onmouseover="this.src=\''+title+'_on.gif\'" src="'+title+'_off.gif" border=0>';
			fid = "mi"+i+"_"+l;
			title = '<img id="'+fid+'" src="'+title+'_off.gif" border=0>';
			isimage = true;
		} else {
		 	bar.images[l] = null;
		 	isimage = false;
		}
		title = "&nbsp;" +title +"&nbsp;";
		link = m[p++];
		fid = "td"+i+"_"+l;
 
		if(true || i==posA && l == posB)
			content += '<td id="'+fid+'" onmouseover="iemover('+l+')" onmouseout="iemout('+l+')"><a class="meny" href="'+link+'">'+title+'&nbsp;</a></td>';
		else
			content += '<td onmouseover="this.style.backgroundColor=\'#8e826a\'" onmouseout="this.style.backgroundColor=\'#c4bdb9\'"><a onmouseover="this.style.color=\'white\'" onmouseout="this.style.color=\'black\'" class="meny" href="'+link+'">'+title+'</a></td>';
      }
      bar.write(content + "</table>");
      bar.end();
      bar.num = i;
      bar.moveTo(x,y);
      if(!IE5) {
			if(!Macintosh) {
				bar.moveTo(x,y+24);
			} else {
				bar.moveTo(x,y);
			}
      } else {
		bar.moveTo(x,y);
	  }
		
      bar.resizeTo(800, 16);
      bar.hide();
      bar.setmouseover(barover)
      bar.setmouseout(barout)
      bar.setBGcolor("#c4bdb9");
      //bar.setBGcolor("blue");
      
  }
  showCurrentPos();
}

function iemover(i) {
 showSubItem(i)
 showing = i
}

function iemout() {
 hideShowing();
 showing = null;
}

function initIE() {
IE = (!document.layers)
if(IE) {
	initVars();
	initVars2();
  if(IE4 && !IE5){
	y = 110; x=10;
  }else{
	y = 95; x=0;
  }
  if(IE5 || Macintosh) {
  	y += 24; x+= 0;
  }
  if(!Macintosh)
      y -= 0;
  makemenuIE(x,y);
  initialized = true;
} 
}



function checkIt(stitle){
	var stext = new String(stitle.value);
	var regexpone = eval("/^[a-z][a-z_0-9\.\-\_]+@[a-z_0-9\.]+\.[a-z]{3}$/i");
	var hotmail = eval("/^[a-z][a-z_0-9\.\-\_]+@hotmail+\.[a-z]{3}$/i");
	var yahoo = eval("/^[a-z][a-z_0-9\.\-\_]+@yahoo+\.[a-z]{3}$/i");
	
	offsetone = stext.search(regexpone);
	offsettwo = stext.search(hotmail);
	offsetthree = stext.search(yahoo);
	
	if (stitle.value == "")
		{
			alert("Please enter an Email Address.");
			stitle.select();
			stitle.focus();
			return false;
		}else{
			if (offsetone == -1)
			{
				alert("You must enter a Valid Email address such as JDoe@mycompany.com.");
				stitle.focus();
				stitle.select();
				return false;
			}else if (offsettwo != -1) {
				alert("You may not enter a hotmail address.");
				stitle.focus();
				stitle.select();
				return false; 
			}else if (offsetthree != -1) {
				alert("You may not enter a yahoo address.");
				stitle.focus();
				stitle.select();
				return false; 
			} else {
				//alert("form = "+FormCheck)
				return true;
			}
		}

}


//-->




