
    count = 0;
    function winName(file) {
      return 'Win' + count++;
    }

    function winName(file) {
      f = file.replace(/\//g,"_");
      f = f.replace(/\./g,"_");
      f = f.replace(/\-/g,"_");
      return f;
    }

    function openWindow(file, width, height) {
      unique = winName(file);

      Win = open(file, 'win' + unique, 'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',scrollbars=0');
      Win.focus();
    }


function navHandler(locVar){
  window.location.href = locVar; 
}


// crappy browser checker
var isIE4, isNN4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
  isNN4 = ((navigator.appName == "Netscape") && (navigator.appVersion.charAt(0) < 5)) ? true : false
  isIE4 = (navigator.appName.indexOf("Microsoft" != -1)) ? true : false
}


function msieversion() {
  // Return IE (major) version number, or 0 for others.
  var ua = window.navigator.userAgent;
  var msie = ua.indexOf("MSIE ");
  if ( msie > 0 )
    return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )
  else
    return 0    // is other browser
}

// image preloader
if (document.images) {
experience = new Image(89, 33);experience.src = 'images/lnk-experience.gif';
experienceOn = new Image(89, 33);experienceOn.src = 'images/lnk-experience-on.gif';
proExpertise = new Image(178, 33);proExpertise.src = 'images/lnk-proExpertise.gif';
proExpertiseOn = new Image(178, 33);proExpertiseOn.src = 'images/lnk-proExpertise-on.gif';
skills = new Image(62, 33);skills.src = 'images/lnk-skills.gif';
skillsOn = new Image(62, 33);skillsOn.src = 'images/lnk-skills-on.gif';
associations = new Image(130, 33);associations.src = 'images/lnk-associations.gif';
associationsOn = new Image(130, 33);associationsOn.src = 'images/lnk-associations-on.gif';
currentProjects = new Image(150, 33);currentProjects.src = 'images/lnk-currentProjects.gif';
currentProjectsOn = new Image(150, 33);currentProjectsOn.src = 'images/lnk-currentProjects-on.gif';
contact = new Image(100, 33);contact.src = 'images/lnk-contact.gif';
contactOn = new Image(100, 33);contactOn.src = 'images/lnk-contact-on.gif';

antennaContact = new Image(100, 33);antennaContact.src = 'images/lnk-antenna-contact.gif';
antennaContactOn = new Image(100, 33);antennaContactOn.src = 'images/lnk-antenna-contact-on.gif';

press = new Image(36, 33);press.src = 'images/lnk-press.gif';
pressOn = new Image(36, 33);pressOn.src = 'images/lnk-press-on.gif';

professional = new Image(204, 204);professional.src = 'images/lnk-home-professional.gif';
professionalOn = new Image(204, 204);professionalOn.src = 'images/lnk-home-professional-on.gif';
antenna = new Image(204, 204);antenna.src = 'images/lnk-home-antenna.gif';
antennaOn = new Image(204, 204);antennaOn.src = 'images/lnk-home-antenna-on.gif';
personal = new Image(204, 204);personal.src = 'images/lnk-home-personal.gif';
personalOn = new Image(204, 204);personalOn.src = 'images/lnk-home-personal-on.gif';
indContact = new Image(204, 204);indContact.src = 'images/lnk-indContact.gif';
indContactOn = new Image(204, 204);indContactOn.src = 'images/lnk-indContact-on.gif';
}


// image swapper
function changeImages(id,name){
  if (document.images) {document.images[id].src=eval(name+".src"); }
}


// layer show-hider

/*
This code is from Dynamic Web Coding 
at http://www.dyn-web.com/
Copyright 2001-2 by Sharon Paine 
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code 
as long as this entire notice is included.
*/

// resize fix for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function loadLyr(lyr) {
	if (cur_lyr) {
		var curcss = get_lyr_css(cur_lyr);
		if (curcss) curcss.visibility="hidden";
	}
  cur_lyr = lyr;
	var curcss = get_lyr_css(cur_lyr);
	if (curcss) {
		curcss.visibility = "visible";
		curcss.zIndex = 1000;	// some browsers need z-index set
	}
}

// get reference
function get_lyr_css(id) {
	var lyr, lyrcss;
	lyr = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
	if (lyr) lyrcss = (lyr.style)? lyr.style: lyr;
	return lyrcss;
}

// get reference to nested layer for ns4
// from old dhtmllib.js by Mike Hall of www.brainjar.com
function getLyrRef(lyr,doc) {
	if (document.layers) {
		var theLyr;
		for (var i=0; i<doc.layers.length; i++) {
	  	theLyr = doc.layers[i];
			if (theLyr.name == lyr) return theLyr;
			else if (theLyr.document.layers.length > 0) 
	    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
					return theLyr;
	  }
		return null;
  }
}
