// JavaScript Documentfunction newImage(arg) {	if (document.images) {		rslt = new Image();		rslt.src = arg;		return rslt;	}}function changeImages() {	if (document.images && (preloadFlag == true)) {		for (var i=0; i<changeImages.arguments.length; i+=2) {			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];		}	}}var preloadFlag = false;function preloadImagesNav() {	if (document.images) {		home_over = newImage("tableImages/nav_btn_01_over.gif");		portflio_over = newImage("tableImages/nav_btn_02_over.gif");		clients_over = newImage("tableImages/nav_btn_03_over.gif");		services_over = newImage("tableImages/nav_btn_04_over.gif");		contact_over = newImage("tableImages/nav_btn_05_over.gif");		preloadFlag = true;	}}function preloadImagesSubSub() {	if (document.images) {		approach_over = newImage("../../tableImages/approach_over.gif");		portflio_over = newImage("../../tableImages/portfolio_over.gif");		contact_over = newImage("../../tableImages/contact_over.gif");		jobs_over = newImage("../../tableImages/jobs_over.gif");		client_over = newImage("../../tableImages/client_over.gif");		preloadFlag = true;	}}// Browser ID Utilitiesvar gAgent = window.navigator.userAgent;var gAgentVers = parseInt(gAgent.charAt(gAgent.indexOf("/")+1),10);function is_explorer(){	return gAgent.indexOf("MSIE") > 0;}function is_macnetscape(){	if (gAgent.indexOf("Mac") <= 0)		return false;	else		return !(gAgent.indexOf("MSIE") > 0);}function is_pcnetscape(){	if (gAgent.indexOf("Mac") > 0)		return false;	else		return !(gAgent.indexOf("MSIE") > 0);}function is_aol(){	return gAgent.indexOf("AOL") > 0;}// Flash and Image Utilities// Check whether Flash is installed on the user's computer and create a cookie with the// result. The cookie has four possible values which tell other routines what to do when// asked to insert a Flash movie:// "img" - write out <IMG> tag instead// "swf" - write out <EMBED> tag and use a Flash movie// "mov" - write out <EMBED> tag and use a QuickTime movie (QT4 onwards plays Flash)// "none" - do nothing, <NOSCRIPT> will handle the image in Netscape 2var gImageHandling = "";function check_flash(){	var nextYear = new Date();	gImageHandling = "none";	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)	{		// Navigator and Explorer ver 5 onwards		if (navigator.plugins && navigator.plugins["Shockwave Flash"])		{			var desc = navigator.plugins["Shockwave Flash"].description;			var vers = parseInt(desc.charAt(16));			if (vers >= 3) gImageHandling = "swf";		}	}	if (gImageHandling == "none" && navigator.mimeTypes && navigator.mimeTypes["video/quicktime"] && navigator.mimeTypes["video/quicktime"].enabledPlugin)	{		// Navigator and Explorer ver 5 onwards		var instPlugins = navigator.plugins		for (var i = 0; i < instPlugins.length; i++)		{   			if (instPlugins[i].name.indexOf("QuickTime")>=0)   			{				var desc = navigator.plugins[i].name;				var vers = parseInt(desc.charAt(18));				if (vers >= 2) gImageHandling = "mov";				i = instPlugins.length;	   		}		}	}	if (gImageHandling == "none" && navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0	   && (navigator.userAgent.indexOf("Windows")>=0 || navigator.userAgent.indexOf("Win32")>=0))	{	   	// Explorer on a 32-bit PC		document.write('<scr' + 'ipt language=VBSc' + 'ript\> \n');		document.write('dim Obj\n');		document.write('gImageHandling = "gif"\n');		document.write('on error resume next \n');		document.write('Set Obj = CreateObject("ShockwaveFlash.ShockwaveFlash.4")\n');		document.write('if IsObject(Obj) = True then gImageHandling = "swf" \n');		document.write('Set Obj = Null \n');		document.write('</scr' + 'ipt\> \n');	}	if (gImageHandling == "none" && !(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0))	{		// Anything else, other than Navigator ver 2 which will use <NOSCRIPT>		gImageHandling = "gif";	}	// Write out cookie	nextYear.setFullYear(nextYear.getFullYear() + 1);	document.cookie = "flashHandling=" +  gImageHandling + "; expires=" + nextYear.toGMTString() + "; domain=nykris.com; path=/";//	document.write('<p>gImageHandling (cookie)=' + gImageHandling + '</p>');}function check_flash_nocookie(){	gImageHandling = "none";	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)	{		// Navigator and Explorer ver 5 onwards		if (navigator.plugins && navigator.plugins["Shockwave Flash"])		{			var desc = navigator.plugins["Shockwave Flash"].description;			var vers = parseInt(desc.charAt(16));			if (vers >= 3) gImageHandling = "swf";		}	}	if (gImageHandling == "none" && navigator.mimeTypes && navigator.mimeTypes["video/quicktime"] && navigator.mimeTypes["video/quicktime"].enabledPlugin)	{		// Navigator and Explorer ver 5 onwards		var instPlugins = navigator.plugins		for (var i = 0; i < instPlugins.length; i++)		{   			if (instPlugins[i].name.indexOf("QuickTime")>=0)   			{				var desc = navigator.plugins[i].name;				var vers = parseInt(desc.charAt(18));				if (vers >= 2) gImageHandling = "mov";				i = instPlugins.length;	   		}		}	}	if (gImageHandling == "none" && navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0	   && (navigator.userAgent.indexOf("Windows")>=0 || navigator.userAgent.indexOf("Win32")>=0))	{	   	// Explorer on a 32-bit PC		document.write('<scr' + 'ipt language=VBSc' + 'ript\> \n');		document.write('dim Obj\n');		document.write('gImageHandling = "gif"\n');		document.write('on error resume next \n');		document.write('Set Obj = CreateObject("ShockwaveFlash.ShockwaveFlash.4")\n');		document.write('if IsObject(Obj) = True then gImageHandling = "swf" \n');		document.write('Set Obj = Null \n');		document.write('</scr' + 'ipt\> \n');	}	if (gImageHandling == "none" && !(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0))	{		// Anything else, other than Navigator ver 2 which will use <NOSCRIPT>		gImageHandling = "gif";	}	//document.write('<p>gImageHandling (no cookie)=' + gImageHandling + '</p>');}// Insert a Flash movie or fallback GIF into the current page depending upon the setting// of the imageHandling cookie.function insert_flash(name, width, height, bgCol){	var imageHandling = document.cookie;	if (imageHandling.indexOf("flashHandling") == -1)	{		// No cookie exists - ie cookies are off, so do manual check		check_flash_nocookie();		imageHandling = gImageHandling	}	if (imageHandling.indexOf("none") != -1)	{	}	else if (imageHandling.indexOf("swf") != -1)	{		document.write('<embed src="' + name + '.swf"');		document.write(' swLiveConnect=false width=' + width + ' height=' + height);		document.write(' loop=false quality=high scale=noborder bgcolor=' + bgCol);		document.write(' type="application/x-shockwave-flash"\>');		document.write('</embed\>');		document.write('<noembed\><img src="' + name + '.jpg" width=' + width + ' height=' + height + ' border=0 usemap="#' + name + '"\></noembed\>');	}	else	{		document.write('<img src="' + name + '.jpg" width=' + width + ' height=' + height + ' border=0 usemap="#' + name + '"\>');	}}// The lines above can be gif or jpg but not bothfunction insert_flash_text(name, width, height, bgCol, dir, num, loop, text_a, text_b){	var imageHandling = document.cookie;	if (imageHandling.indexOf("flashHandling") == -1)	{		// No cookie exists - ie cookies are off, so do manual check		check_flash_nocookie();		imageHandling = gImageHandling	}	if (imageHandling.indexOf("none") != -1)	{	}	else if (imageHandling.indexOf("swf") != -1)	{		document.write('<embed src="' + name + '.swf"');		document.write(' FlashVars="imageDir=' + dir + '&imageNum=' + num + '&imageLoop=' + loop + '&text_a=' + text_a + '&text_b=' + text_b + '"');		document.write(' swLiveConnect=false width=' + width + ' height=' + height);		document.write(' loop=false quality=high scale=noborder bgcolor=' + bgCol);		document.write(' type="application/x-shockwave-flash"\>');		document.write('</embed\>');		document.write('<noembed\><img src="' + name + '.jpg" width=' + width + ' height=' + height + ' border=0 usemap="#' + name + '"\></noembed\>');	}	else	{		document.write('<img src="' + name + '.jpg" width=' + width + ' height=' + height + ' border=0 usemap="#' + name + '"\>');	}}// The lines above can be gif or jpg but not both// Java 1.0 doesn't support a split method, so define one herefunction mysplit (stringtoSplit, separator){	var splitIndex = 0 ;	var splitArray = new Array () ;	while ((stringtoSplit.length > 0) && (separator.length > 0))	{		var i = stringtoSplit.indexOf (separator) ;		if ((!i) && (separator != stringtoSplit.substring (0, separator.length)))			break ;		if (i == -1)		{			splitArray [splitIndex++] = stringtoSplit ;			break ;		}		splitArray [splitIndex++] = stringtoSplit.substring (0,i) ;		stringtoSplit = stringtoSplit.substring (i+separator.length, stringtoSplit.length) ;	}	splitArray.length = splitIndex;	return splitArray ;}function moreClicked(){	var p = document.getElementById("bio");	p.style.height = "auto";	p.style.overflow = "visible";	var m = document.getElementById("more");	m.style.display = "none"}function hide_bio(){	var p = document.getElementById("bio");	if(p.scrollHeight>110){		p.style.overflow = "hidden";		p.style.height = "115px";		var m = document.getElementById("more");		m.style.display = "block"	}}var ajax_status = false;//Create a boolean variable to check for a valid Internet Explorer instance.var xmlhttp = false;//Check if we are using IE.try{	//If the Javascript version is greater than 5.	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}catch (e){	//If not, then use the older active x object.	try	{		//If we are using Internet Explorer.		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");	}	catch (E)	{		//Else we must be using a non-IE browser.		xmlhttp = false;	}}if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){	xmlhttp = new XMLHttpRequest();}function make_request(server_page, obj_id){	if (server_page.indexOf('?') > -1) server_page = server_page+"&"+time();	else server_page = server_page+"?"+time();	xmlhttp.open("GET", server_page);	xmlhttp.onreadystatechange = function()	{		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)		{			var content = xmlhttp.responseText;			if (obj_id)			{				$(obj_id).innerHTML = content;				var ajaxScript = $(obj_id).getElementsByTagName("script");				if(ajaxScript.length)				{					for (x = 0;x < ajaxScript.length; x++)					eval(ajaxScript[x].innerHTML);				}			}			xmlhttp.onreadystatechange = function(){};			ajax_status = true;		}	}	xmlhttp.send(null);}function time(){	var d = new Date();	return d.getTime();}function $(obj_id){	return document.getElementById(obj_id);}function make_active(o){	for(var i = 0; i < 6; i++)	{		if(i != o) $(i).style.color = "#ef4923";	}	$(o).style.color = "#2f3032";}function result_hover(obj){	obj.style.backgroundColor = "rgb(255, 219, 185)";	obj.style.backgroundImage = "none";}function reset_hover(obj){	obj.style.backgroundColor = "";	obj.style.backgroundImage ="";}function debug(debug_id,debug_var){	if (!(debug_element = document.getElementById('debug_'+debug_id)))	{		var debug_element = document.createElement("div");		debug_element.style.position = "fixed";		debug_element.style.right="10px";		debug_element.style.height="15px";		debug_element.style.backgroundColor="#E0E0E0";		debug_element.style.font="13px/17px verdana";		debug_element.id = "debug_"+debug_id;		debug_element.style.bottom = 10+(debug_id*20)+"px";		document.body.appendChild(debug_element);	}	debug_element.innerHTML = debug_var;}var scrolling = false;function scroll(obj,a){	if (!obj) return false;	if (!a) return false;	if (scrolling) return false;	scroll_obj = obj;	amount = a;	from = scroll_obj.scrollTop;	if (from == 0 && a < 0) return false;	if (from + a >= scroll_obj.scrollHeight) return false;	scrolling = true;	scroll_it();}function scroll_it(){	var offset = 0;	if (amount < 0) offset = -4;	else offset = 4;	if (amount > 0)	{		if (scroll_obj.scrollTop+offset < from+amount && (scroll_obj.scrollTop + offset + scroll_obj.clientHeight) < scroll_obj.scrollHeight)		{			scroll_obj.scrollTop+=offset;			setTimeout(scroll_it,20);		}		else		{			scroll_obj.scrollTop = from+amount;			scrolling = false;		}	}	else	{		if ((scroll_obj.scrollTop + offset) < 0)		{			scroll_obj.scrollTop = 0;			scrolling = false;		}		else if (scroll_obj.scrollTop+offset > from+amount)		{			scroll_obj.scrollTop+=offset;			setTimeout(scroll_it,20);		}		else		{			scroll_obj.scrollTop = from+amount;			scrolling = false;		}	}}