
var site_root = 'http://www.dvinci.com/';


//	Browser detection
var w3c = (document.getElementById) ? true : false;
var ie = (document.all && w3c) ? true : false;
var ie7 = (document.all && document.getElementById && window.XMLHttpRequest) ? true : false;
var ie6 = (ie && !ie7) ? true : false;
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();



// Flash content control.
var pages_with_flash = new Array();
pages_with_flash[0] = new Array('production/elearning/index.php','elearningSpotlight.swf',303,645,'spotLight');
pages_with_flash[1] = new Array('production/elearning/pricingConsiderations.php','pricingConsiderations.swf',342,645,'spotLight');
pages_with_flash[2] = new Array('production/edutainment/index.php','edutainmentSpotlight.swf',303,645,'spotLight');
pages_with_flash[3] = new Array('production/elearning/dvinciApproach.php','dVinciApproach.swf',303,645,'spotLight');
pages_with_flash[4] = new Array('production/cdromsWebsites/dvinciApproach.php','dVinciApproachWeb.swf',303,645,'spotLight');
pages_with_flash[5] = new Array('company/index.php','dIntro.swf',303,645,'spotLight');
pages_with_flash[6] = new Array('codevelopment/index.php','codevelopmentSpotlight.swf',303,645,'spotLight');
pages_with_flash[7] = new Array('codevelopment/authorware.php','authorwareCodevelopment.swf',303,645,'spotLight');
pages_with_flash[8] = new Array('codevelopment/coldFusion.php','coldfusionCodevelopment.swf',303,645,'spotLight');
pages_with_flash[9] = new Array('codevelopment/css.php','cssCodevelopment.swf',303,645,'spotLight');
pages_with_flash[10] = new Array('codevelopment/flash.php','flashCodevelopment.swf',303,645,'spotLight');
pages_with_flash[11] = new Array('codevelopment/php.php','phpCodevelopment.swf',303,645,'spotLight');
pages_with_flash[12] = new Array('training/authorware/index.php','authorwareTraining.swf',303,645,'spotLight');
pages_with_flash[13] = new Array('training/authorware/fundamentals.php','authorwareTrainingFastTrack.swf',303,645,'spotLight');
pages_with_flash[14] = new Array('training/authorware/advanced.php','authorwareTrainingAdvanced.swf',303,645,'spotLight');
pages_with_flash[15] = new Array('training/captivate/index.php','captivateTraining.swf',303,645,'spotLight');
pages_with_flash[16] = new Array('training/captivate/captivate.php','captivateTrainingUsingCaptivate.swf',303,645,'spotLight');
pages_with_flash[17] = new Array('training/cf/index.php','coldfusionTraining.swf',303,645,'spotLight');
pages_with_flash[18] = new Array('training/cf/ftcfmx7.php','coldfusionTrainingFastTrackMX7.swf',303,645,'spotLight');
pages_with_flash[19] = new Array('training/css/index.php','cssTraining.swf',303,645,'spotLight');
pages_with_flash[20] = new Array('training/css/css2.php','cssTrainingWebDesignCSS.swf',303,645,'spotLight');
pages_with_flash[21] = new Array('training/dreamweaver/index.php','dreamweaverTraining.swf',303,645,'spotLight');
pages_with_flash[22] = new Array('training/dreamweaver/dwwd-8.php','dreamweaverTrainingCS3_1.swf',303,645,'spotLight');
pages_with_flash[23] = new Array('training/dreamweaver/dwwd-8.php','dreamweaverTrainingCS3_1.swf',303,645,'spotLight');
pages_with_flash[24] = new Array('training/dreamweaver/dwwd-8.php','dreamweaverTrainingCS3_1.swf',303,645,'spotLight');
pages_with_flash[25] = new Array('training/flash/index.php','flashTraining.swf',303,645,'spotLight');
pages_with_flash[26] = new Array('training/flash/flash8_frcc.php','flashTrainingCS3_1.swf',303,645,'spotLight');
pages_with_flash[27] = new Array('training/flash/flash8_flas.php','flashTrainingActionscript.swf',303,645,'spotLight');
pages_with_flash[28] = new Array('training/flash/flash8_fadd.php','flashTrainingAdvancedDesign.swf',303,645,'spotLight');
pages_with_flash[29] = new Array('training/php/index.php','phpTraining.swf',303,645,'spotLight');
pages_with_flash[30] = new Array('training/php/php_intro.php','phpTrainingIntroduction.swf',303,645,'spotLight');
pages_with_flash[31] = new Array('training/robohelp/index.php','robohelpTraining.swf',303,645,'spotLight');
pages_with_flash[32] = new Array('training/robohelp/mmrh.php','robohelpTrainingX5.swf',303,645,'spotLight');
pages_with_flash[33] = new Array('training/index.php','dVinciTrainingIntro.swf',303,645,'spotLight');
pages_with_flash[34] = new Array('portfolio/project.php','portfolioViewer.swf' + getQueryString() ,380,645,'spotLight');
//pages_with_flash[34] = new Array('portfolio/project.php','portfolioViewer.swf' + location.search ,380,645,'spotLight');
pages_with_flash[35] = new Array('portfolio/index.php','portfolioExplore.swf',303,645,'spotLight');
pages_with_flash[36] = new Array('sitewide','../flashProjectViewer.swf?levelsDeep=1',515,620,'projectHead');
pages_with_flash[37] = new Array('sitewide','dVincFBF.swf','100%','100%','fullScreen');
pages_with_flash[38] = new Array('production/cdromsWebsites/websitesTEST.php','../../portfolioViewerSmall.swf?tag=7&start=100&id=di43a047942194d&num=101',324,620,'spotLightInPageTest');
pages_with_flash[39] = new Array('production/elearning/mobileHandheld.php','elearningMobileHandheld.swf',303,645,'spotLight');
pages_with_flash[40] = new Array('production/cdromsWebsites/mobileHandheld.php','websitesMobileHandheld.swf',303,645,'spotLight');
pages_with_flash[41] = new Array('production/elearning/expertise.php','elearningAreasExpertise.swf',303,645,'spotLight');
pages_with_flash[42] = new Array('production/edutainment/interactiveStorytelling.php','edutainmentStorytelling.swf',303,645,'spotLight');
pages_with_flash[43] = new Array('production/edutainment/onlineGames.php','edutainmentGames.swf',303,645,'spotLight');
pages_with_flash[44] = new Array('production/cdromsWebsites/flash.php','flashWebsitesMore.swf',303,645,'spotLight');
pages_with_flash[45] = new Array('production/elearning/wbt.php','elearningWBT.swf',303,645,'spotLight');
pages_with_flash[46] = new Array('production/edutainment/learningActivities.php','edutainmentRichLearning.swf',303,645,'spotLight');
pages_with_flash[47] = new Array('production/cdromsWebsites/cdroms.php','websitesCDROM.swf',303,645,'spotLight');
pages_with_flash[48] = new Array('production/elearning/cbt.php','elearningCBT.swf',303,645,'spotLight');
pages_with_flash[49] = new Array('production/edutainment/interpretation.php','edutainmentInterpret.swf',303,645,'spotLight');

//	Preload favicon
if (location.href.indexOf('kingston.securenet') == -1) {
	fav_image = new Image();
	fav_image.src = "http://www.dvinci.com/favicon.ico";
}

if (w3c) { 
	// Styles applied by JavaScript before the page loads
	preLoadStyles();
	swfobject.addDomLoadEvent(init);
	//window.onload = init;

}



var body_tag;
var mother_div;
var banner_div;
var content_div;
var innerContent_div;
var subMenu_div;
var footer_div;
var gmap_div;


function init() {
	body_tag = document.getElementsByTagName('BODY')[0];
	mother_div = document.getElementById('mother');
	banner_div = document.getElementById('banner');
	content_div = document.getElementById('content');
	innerContent_div = document.getElementById('innerContent');
	subMenu_div = document.getElementById('subMenu');
	footer_div = document.getElementById('footer');
	gmap_div = document.getElementById('googlemap');



	
	if (swfobject.hasFlashPlayerVersion("8")) {
		runFlash();
	}
		
	setHiddenContent();
	initToolTips();
	contactForm();
	
	if (innerContent_div) {
		innerContent_div.style.position = 'static';
	}
	
	
	
	if (body_tag && body_tag.id == 'portfolioPage') {
		makeDynamicMenu();
	}
	
	if (document.getElementById('stsInformation')) {
		//makeSTSinteraction();
	}
	
	if (document.getElementById('scheduledClassesTable')) {
		setCourseRollies();
	}


	/* ::::::: LOAD GOOGLE MAP :::::::  */
	if (gmap_div) {
		Gload();
	}
	/* ::::::: END LOAD GOOGLE MAP :::::::  */
	

}



function contactForm () {
	var contact_form = document.getElementById('contactForm');
	
	if (contact_form) {
		var all_lis = contact_form.getElementsByTagName('LI');
		//alert(all_lis.length);
		for (var aa=0; aa<all_lis.length; aa++) {
			all_lis[aa].sub_list = all_lis[aa].getElementsByTagName('OL')[0];
			if (all_lis[aa].sub_list) {
				
				all_lis[aa].className = 'hasSubs';
				all_lis[aa].sub_list.style.display = 'none';
				all_lis[aa].rel_label = all_lis[aa].getElementsByTagName('LABEL')[0];
				all_lis[aa].rel_input = all_lis[aa].getElementsByTagName('INPUT')[0];
				
				
				//all_lis[aa].onclick = showContactOptions;
				//all_lis[aa].rel_label.onclick = showContactOptions;
				all_lis[aa].rel_input.onclick = showContactOptions;
		
		
		
				/*all_lis[aa].onclick = function () {
					// Event Bubble!
					//alert(this.sub_list.style.display);
					if (this.sub_list.style.display == 'block') {
						this.sub_list.style.display = 'none';
					} else if (this.sub_list.style.display == 'none') {
						this.sub_list.style.display = 'block';
					}
				}*/
			}
		}
	}
}

function showContactOptions(e) {
	if (!e) {
		var e = window.event;
	}
	
	var targ;
	
	if (e.target) { // w3c
		targ = e.target;
	} else if (e.srcElement) { // Microsoft
		targ = e.srcElement;
	}
	if (targ.nodeType == 3) { // defeat Safari bug
		targ = targ.parentNode;
	}
	
	var rel_sub_list;
	if (targ.nodeName != 'LABEL' && targ.nodeName != 'INPUT') {
		if (this.rel_input.checked == false) {
			this.rel_input.checked = true;
		} else {
			this.rel_input.checked = false	;
		}
		rel_sub_list = targ.sub_list;
	} else {
		rel_sub_list = targ.parentNode.sub_list;
		//alert(targ.parentNode.nodeName);
	}
	
	
	if (rel_sub_list.style.display == 'block') {
		rel_sub_list_inputs = rel_sub_list.getElementsByTagName('INPUT');
		for (var aa=0; aa<rel_sub_list_inputs.length; aa++) {
			rel_sub_list_inputs[aa].checked = false;
		}
		rel_sub_list.style.display = 'none';
	} else if (rel_sub_list.style.display == 'none') {
		rel_sub_list.style.display = 'block';
	}
	
	e.cancelBubble = true;
	if (e.stopPropagation) {
		e.stopPropagation();
	}
	
	
}


function toolTip(link_obj, tt_text) {
	div_elem = document.createElement('DIV');
	div_elem.className = 'toolTip';
	div_elem.assc_link = link_obj;
	div_text = document.createTextNode(tt_text);
	
	div_elem.appendChild(div_text);
	
	link_obj.parentNode.appendChild(div_elem);
	
	posToolTip(div_elem);
	
	return div_elem;
}

function initToolTips() {
	var all_links = innerContent_div.getElementsByTagName('DFN');
	for (var ll=0; ll<all_links.length; ll++) {
		if (all_links[ll].className == 'glossTerm') {
			
			all_links[ll].className = 'glossTermApplied';
			
			tt = toolTip(all_links[ll], all_links[ll].title);
			
			all_links[ll].removeAttribute('title');
			all_links[ll].assc_tt = tt;
			
			all_links[ll].onmouseover = function() {
				posToolTip(this.assc_tt);
				
				this.assc_tt.style.display = 'block';
			}
			all_links[ll].onmouseout = function() {
				this.assc_tt.style.display = 'none';
			}
		}
	}
}

function posToolTip(tt) {
		tt_width = 322;
		//alert(tt_width);
		mpos = findPos(tt.assc_link);
		mx = mpos[0]; 
		my = mpos[1];			
		tt.style.left = (mx+10) + 'px';
		tt.style.top = (my+20) + 'px';
		
		if (window.innerWidth && ((mx+tt_width) > window.innerWidth)) {
			tt.style.left = (window.innerWidth - tt_width - 25) + "px";
		}
		if (document.body.scrollWidth && ((mx+tt_width) > document.body.scrollWidth)) {
			tt.style.left = (document.body.scrollWidth - tt_width - 25) + "px";
		}
		
}
function findPos(obj) {
	var curleft = 0;
	var curtop = 0;
	curleft = obj.offsetLeft;
	curtop = obj.offsetTop;
	
	if (document.all) {
		curleft += 200;
		curtop += 105;
		
	}
	
	//alert('curleft = '+curleft+'; curtop = '+curtop);
	
	return [curleft,curtop];
}


function ieHoverHelper(parent_id, hover_element, class_name) {
	if (ie6) {
		var rollies = document.getElementById(parent_id).getElementsByTagName(hover_element);
		
		for (aa=0; aa<rollies.length; aa++) {

			rollies[aa].onmouseenter = function() {
				if (this.className == '') {
					this.className = class_name;
				} else {
					this.className = class_name +  ' ' + this.className;
				}
			}
			rollies[aa].onmouseleave = function() {
				if (this.className == class_name) {
					this.className = '';
				} else {
					str = class_name+' ';
					if (this.className.indexOf(str) != -1) {
						remove_class = this.className.split(str);
						this.className = remove_class[1];
					}
				}
			}
		}
	}
}



function setCourseRollies() {
	if (ie6) {
		ieHoverHelper('scheduledClassesTable','TR','on');
	}
	var sc_div = document.getElementById('scheduledClassesTable');
	var check_boxes = sc_div.getElementsByTagName('INPUT');
	var sc_lis = sc_div.getElementsByTagName('TR');
	
	if (ie) sc_div.cellSpacing = '0';
	
	for (var aa=0; aa<sc_lis.length; aa++) {
		sc_lis[aa].rel_input = sc_lis[aa].getElementsByTagName('INPUT')[0];
		sc_lis[aa].rel_label = sc_lis[aa].getElementsByTagName('LABEL')[0];
		if (sc_lis[aa].rel_input.checked == true) {
			sc_lis[aa].className = 'stayOn';
		}
		
		/*sc_lis[aa].onclick = function (e) {
			
			if (!e) var e = window.event;
			
			if (this.rel_input.checked == false) {
				this.className += ' ' + 'stayOn';
				this.rel_input.checked = true;
			} else {
				this.rel_input.checked = false	;
			}
		}
		*/
		sc_lis[aa].onclick = setCourseBG;
		sc_lis[aa].rel_label.onclick = setCourseBG;
		sc_lis[aa].rel_input.onclick = setCourseBG;
		//sc_lis[aa].rel_input.addEventListener();
	}
}

function setCourseBG(e) {
	if (!e) {
		var e = window.event;
	}
	
	var targ;
	
	if (e.target) { // w3c
		targ = e.target;
	} else if (e.srcElement) { // Microsoft
		targ = e.srcElement;
	}
	if (targ.nodeType == 3) { // defeat Safari bug
		targ = targ.parentNode;
	}
	
	if (targ.nodeName != 'LABEL' && targ.nodeName != 'INPUT') {
		if (this.rel_input.checked == false) {
			this.rel_input.checked = true;
		} else {
			this.rel_input.checked = false	;
		}
	}

	if (this.nodeName == 'TR') {
		if (this.rel_input.checked == false) {
			this.className = '';
		} else {
			this.className = 'stayOn';
		}
		
		e.cancelBubble = true;
		if (e.stopPropagation) {
			e.stopPropagation();
		}
	}
}


function preLoadStyles() {
	var this_id_name;
	var this_swf_url;
	var style_elems =  '';
	var flash_spotlight = false;
	var ie_scrollbar_code = 'scrollbar-3dlight-color: #000; scrollbar-arrow-color: #003942; scrollbar-darkshadow-color: #000; scrollbar-face-color: #f6b535; scrollbar-highlight-color: #ffeacc; scrollbar-shadow-color: #a1620b; scrollbar-track-color: #e6c9a1;';
	
	swfobject.createCSS('#spotLight', 'display: none;');
	swfobject.createCSS('.outstanding', '-moz-border-radius: 9px;');
	swfobject.createCSS('html', ie_scrollbar_code);
	swfobject.createCSS('body', ie_scrollbar_code);
	
	
	for (var ee=0; ee<pages_with_flash.length; ee++) {
		this_id_name = pages_with_flash[ee][4];
		this_swf_url = pages_with_flash[ee][0];
		if (style_elems.indexOf(this_id_name) == -1 && (location.href.indexOf(this_swf_url) != -1  || this_swf_url == 'sitewide')) {
			//style_elems += '#' + this_id_name + ', ';
			swfobject.createCSS('#' + this_id_name, 'visibility: hidden;');
			
			if (this_id_name == 'spotLight') {
				flash_spotlight = true;
				//swfobject.createCSS('#spotLight', 'background-image: none;');
			}
		}
	}

	if (flash_spotlight == true && (ie6 || ie7)) {
		swfobject.createCSS('#innerContent', 'position: relative; top: 283px;');
	}
	if (location.href.indexOf('/portfolio/') != -1) {
		swfobject.createCSS('#subMenu', 'visibility: hidden;');
	}
}


function showFlashElements() {
	var this_id_name;
	for (var aa=0; aa<pages_with_flash.length; aa++) {
		this_id_name = pages_with_flash[aa][4];
		if (document.getElementById(this_id_name)) {
			document.getElementById(this_id_name).style.visibility = 'visible';
		}
	}
}






/*var sm_dts;
var dm_spans;
var selected_state_height;
var menu_to;
var tallest_dd = 260;*/
var now_opening;
var selected_state = -1;
var is_animating = false;
var menu_spans;

function makeDynamicMenu () {
	
	var subMenu_list = subMenu_div.getElementsByTagName('UL')[0];
	var subMenu_lis = subMenu_list.getElementsByTagName('LI');
	
	menu_spans = subMenu_list.getElementsByTagName('SPAN');
	
	for (var aa=0; aa<menu_spans.length; aa++) {
		
		if (menu_spans[aa].parentNode.nodeName == 'LI') {
			menu_spans[aa].array_pos = aa;
			menu_spans[aa].rel_ul = menu_spans[aa].parentNode.getElementsByTagName('UL')[0];
			
			/* :::::::::::::: SET UL UL STYLES :::::::::::::: */
			menu_spans[aa].rel_ul_offset_ht = menu_spans[aa].rel_ul.offsetHeight;
			menu_spans[aa].rel_ul_style_ht = (menu_spans[aa].rel_ul_offset_ht - 5);
			//menu_spans[aa].rel_ul.style.height = menu_spans[aa].rel_ul_style_ht + 'px';
			
			if (menu_spans[aa].parentNode.className == 'selected') {
				selected_state = aa;
				menu_spans[aa].rel_ul.style.height = menu_spans[aa].rel_ul_style_ht + 'px';
			} else {
				
				menu_spans[aa].rel_ul.style.height = '0';
				menu_spans[aa].rel_ul.style.display = 'none';
				//menu_spans[aa].rel_ul.style.visibility = 'hidden';
				menu_spans[aa].rel_ul.style.overflow = 'hidden';
			}
			/* :::::::::::::: END UL UL STYLES :::::::::::::: */
			
			//alert(dm_spans[aa].parentNode.getElementsByTagName('UL')[0]);
			menu_spans[aa].onclick = function () {
				
				if (selected_state != this.array_pos && is_animating != true) {
					
					for (var bb=0; bb<subMenu_lis.length; bb++) {
						subMenu_lis[bb].className = 'x';
					}
					
					is_animating = true;
					this.rel_ul.style.display = 'block';
					this.parentNode.className = 'selected';
					//this.rel_ul.style.height = '0';
					//this.rel_ul.style.overflow = 'hidden';
					//this.rel_ul.style.visibility = 'hidden';
					
					
					/*dm_spans[selected_state].parentNode.getElementsByTagName('UL')[0].style.overflow = 'hidden';
					dm_spans[selected_state].parentNode.getElementsByTagName('UL')[0].style.minHeight = '0';
					dm_spans[selected_state].parentNode.getElementsByTagName('UL')[0].style.height = tallest_dd + 'px';
					dm_spans[selected_state].parentNode.getElementsByTagName('UL')[0].style.display = 'none';*/
					if (selected_state != -1) {
						//menu_spans[selected_state].rel_ul.style.height = '0';
						//menu_spans[selected_state].rel_ul.style.visibility = 'hidden';
						menu_spans[selected_state].rel_ul.style.overflow = 'hidden';
					}
					
					now_opening = this.array_pos;
					animateSuperMenus();
					
				}
			}
			
			// Accomodate weak-ass IE 6
			if (typeof document.body.style.maxHeight == "undefined") {
				menu_spans[aa].onmouseover = function () {
					this.className = 'over';
				}
				menu_spans[aa].onmouseout = function () {
					this.className = 'foo';
				}
			}
		}
	}
	subMenu_list.id = 'dynamicMenu';
	subMenu_div.style.visibility = 'visible';
	
}

var jump_unit = 40;
var ss_height = 0;
//var min_height = 280;
function animateSuperMenus() {
	var no_height = parseInt(menu_spans[now_opening].rel_ul.style.height);
	if (selected_state != -1) { ss_height = parseInt(menu_spans[selected_state].rel_ul.style.height); }
	//alert(no_height);

	if (ss_height > jump_unit && selected_state != -1) {
		menu_spans[selected_state].rel_ul.style.height = (ss_height - jump_unit) + 'px';
	} else if (ss_height <= jump_unit && selected_state != -1) {
		menu_spans[selected_state].rel_ul.style.display = 'none';
		menu_spans[selected_state].rel_ul.style.height = '0';
		//menu_spans[selected_state].rel_ul.style.visibility = 'hidden';
		menu_spans[selected_state].rel_ul.style.overflow = 'hidden';
		ss_height = 0;
		
	}
	
	
	
	if (no_height < (menu_spans[now_opening].rel_ul_style_ht - jump_unit)) {
		menu_spans[now_opening].rel_ul.style.height = (no_height + jump_unit) + 'px';
	} else {
		menu_spans[now_opening].rel_ul.style.height = menu_spans[now_opening].rel_ul_style_ht + 'px';
		menu_spans[now_opening].rel_ul.style.overflow = 'visible';
		//menu_spans[now_opening].rel_ul.style.visibility = 'visible';
		
	}
	
	menu_to = setTimeout('animateSuperMenus()',20);
	
	if (menu_spans[now_opening].rel_ul.style.overflow == 'visible' && ss_height == 0) {
		clearTimeout(menu_to);
		
		//dm_spans[selected_state].parentNode.getElementsByTagName('UL')[0].style.height = '0';
		//dm_spans[selected_state].parentNode.getElementsByTagName('UL')[0].style.display = 'none';
		
		//dm_spans[now_opening].parentNode.getElementsByTagName('UL')[0].style.minHeight = tallest_dd + 'px';
		
		//ss_height = menu_spans[now_opening].rel_ul_offset_ht;
		
		selected_state = now_opening;
		is_animating = false;
	}
	
}





function makeSTSinteraction() {
	var stsElem = document.getElementById('stsInformation');
	var stsElemDT = stsElem.getElementsByTagName('DT');
	var stsElemDD = stsElem.getElementsByTagName('DD');
	
	stsElem.className = 'detalsInteraction';
	
	for (aa=0; aa<stsElemDT.length; aa++) {
		stsElemDT[aa].related_dd = stsElemDD[aa];
		stsElemDT[aa].onclick = function() {
			for (bb=0; bb<stsElemDT.length; bb++) {
				stsElemDD[bb].style.visibility = 'hidden';
				stsElemDT[bb].className = 'xyz';
			}
			this.related_dd.style.visibility = 'visible';
			this.className = 'selected';
		}
	}
	stsElemDT[0].className = 'selected';
	stsElemDD[0].style.visibility = 'visible';
}





function setHiddenContent() {
	if (innerContent_div) {
		var hidden_elements = innerContent_div.childNodes;
		var hide_show_divs = new Array();
		//alert(hidden_elements.length);
		
		for (aa=0; aa<hidden_elements.length; aa++) {
			if (hidden_elements[aa].className == 'hiddenContent') {
				hide_show_divs.push(hidden_elements[aa]);
			}
		}
		for (bb=0; bb<hide_show_divs.length; bb++) {
			createHideShow(hide_show_divs[bb]);
		}
		
	}
	
}





function createHideShow(obj) {
	var hs_p;
	var show_text;
	var hide_text = 'Collapse Text';
	
	if (obj.title) {
		show_text = obj.title;
		hide_text = 'Collapse: ' + 
		show_text;
	} else {
		show_text = 'More...';		
	}
	
	obj.className = 'hiddenContent hideShowElements';
	
	// Create top control
	hs_p_top = document.createElement('P');
	hs_p_top.className = 'hideShowControlTop';
	if (document.all) {
		hs_p_top.onmouseover = function () {
			this.className = 'hideShowControlTop over';
		}
		hs_p_top.onmouseout = function () {
			this.className = 'hideShowControlTop';
		}
	}
	hs_p_top.assoc_block = obj;
	
	//hs_p_top.show_node_top = document.createTextNode(show_text);
	//hs_p_top.hide_node_top = document.createTextNode(hide_text);
	
	//hs_p_top.appendChild(hs_p_top.show_node_top);
	hs_p_top.innerHTML = show_text;
	
	hs_p_top.onclick = function() {
		if (this.assoc_block.style.display == 'none') {
			this.assoc_block.style.display = 'block';
			this.innerHTML = hide_text;
			//this.replaceChild(this.hide_node_top, this.show_node_top);
		} else {
			this.assoc_block.style.display = 'none';
			this.innerHTML = show_text;
			//this.replaceChild(this.show_node_top, this.hide_node_top);
		}
	}
	
	
	
	// Create bottom control
	hs_p_bot = document.createElement('P');
	hs_p_bot.className = 'hideShowControlBot';
	if (document.all) {
		hs_p_bot.onmouseover = function () {
			this.className = 'hideShowControlBot over';
		}
		hs_p_bot.onmouseout = function () {
			this.className = 'hideShowControlBot';
		}
	}
	
	//hs_p_bot.show_node_bot = document.createTextNode(show_text);
	hs_p_bot.hide_node_bot = document.createTextNode(hide_text);
	hs_p_bot.assoc_block = obj;
	hs_p_bot.assoc_p = hs_p_top;
	
	hs_p_bot.appendChild(hs_p_bot.hide_node_bot);	
	
	hs_p_bot.onclick = function() {
		this.assoc_block.style.display = 'none';
		this.assoc_p.innerHTML = show_text;
		//this.replaceChild(this.assoc_toptextnode, this.hide_node_bot);
		//hs_p_top.replaceChild(,);
	}
	
	// Apeend stuff to document
	//alert(content_div);
	obj.appendChild(hs_p_bot);
	innerContent_div.insertBefore(hs_p_top, obj);
	obj.style.display = 'none';
	
}



//	Popup window code
var page_position = (parseInt(navigator.appVersion) > 3) ? 'left=0,top=0,screenX=0,screenY=0,' : "";
var popup_features = 'menubar=yes,status=yes,toolbar=yes,scrollbars=yes,resizable=yes,width=785,height=480';

function popupWindow(url, target, features) {
	if (isUndefined(features)) {
		features = page_position + popup_features;
	}
	if (isUndefined(target)) {
		target = '_blank';
	}
	var the_window = window.open(url, target, page_position+features);
	the_window.focus();
	return the_window;
}

function linkPopup(src, features) {
	return popupWindow(src.getAttribute('href'),src.getAttribute('target') || '_blank',features);
}//	End Popup window code

//	Utility function [currently used in popupWindow()]
function isUndefined(v) { 
	//	Returns true if [v] is not defined, false otherwise
	//	IE 5.0 does not support the undefined keyword, so we cannot 
	//	do a direct comparison such as v===undefined.
	var undef;
	return v===undef;
}

//	Tricky eMail link code!!
function companyConnect(who,subject) {
	var con_nect = 'mai';
	con_nect = con_nect + 'lto:';
	con_nect = con_nect + who;
	con_nect = con_nect + '@';
	con_nect = con_nect + 'dvinci';
	con_nect = con_nect + '.';
	con_nect = con_nect + 'com';
	if (isUndefined(subject)) {
		subject = '';
	} else {
		subject = '?subject=' + subject;	
	}
	con_nect = con_nect + subject;
	return con_nect;
	}

//	ACCORDIAN CODE:
//	Populate info_block array on page with id names of block elements to be toggled
//	Call initHideShow() <body onload="initHideShow(parent_element)">
//	parent_element = the id of the element the info_block(s) are on

var info_block = new Array();
var intit_block = "";
function initHideShow(parent_element) {
	
	if (w3c) {
		//	Blurring the links so they don't get the ugly outline
		var links_within = document.getElementById(parent_element).getElementsByTagName('a');
		
		function unblur() { this.blur(); }
		
		for(ee=0; ee<links_within.length; ee++) {
			links_within[ee].onfocus = unblur;
		}
		//	Set display to block for the info_block(s)
		for(i=0; i<info_blocks.length; i++) {
			document.getElementById(info_blocks[i]).style.display = 'none';
		}
		// Show a block if intit_block has value, set visibility of parent element to visible
		if (intit_block != "") { 
			document.getElementById(intit_block).style.display = 'block';
			previously_selected = document.getElementById(intit_block).parentNode;
		}
		document.getElementById(parent_element).style.visibility = 'visible';
	} else {
		return;
	}
}
//	Use this code for an accordian list that toggles the item clicked from 'block' to 'none'
function hideShowBlock(block_name) {
	if (w3c) {
		if (document.getElementById(block_name).style.display == 'none') {
			document.getElementById(block_name).style.display = 'block';
		} else {
			document.getElementById(block_name).style.display = 'none';
		}
	} else {
		return;
	}
}
//	Use this code for an accordian list that shows the item clicked on and hides the others
var previously_selected = '';
function revealOneHideOthers(block_name,the_link) {
	if (w3c) {
		for(i=0; i<info_blocks.length; i++) {
			document.getElementById(info_blocks[i]).style.display = 'none';
		}
		document.getElementById(block_name).style.display = 'block';
		//	This is how changing the class attribute SHOULD be done
		//	the_link.parentNode.setAttribute('class','selected');
		//	if (previously_selected != '') previously_selected.removeAttribute('class');
		//	previously_selected = the_link.parentNode;
		
		//	This is a hack so that it works in IE!!!!!!
		the_link.parentNode.className = 'selected';
		if (previously_selected != '' && the_link.parentNode != previously_selected) previously_selected.className = 'poo';
		previously_selected = the_link.parentNode;

	} else {
		return;
	}
}

function runFlash() {

	var this_url = location.href;
	var swf_url;
	var swf_name;
	var swf_height;
	var swf_width;
	var swf_element_id;
	var swf_element;
	
	for (var aa=0; aa<pages_with_flash.length; aa++) {
		
		swf_url = pages_with_flash[aa][0];
		swf_name = pages_with_flash[aa][1];
		swf_height = pages_with_flash[aa][2];
		swf_width = pages_with_flash[aa][3];
		swf_element_id = pages_with_flash[aa][4];
		swf_element = document.getElementById(swf_element_id);
		
		if ((this_url.indexOf(swf_url) != -1  || swf_url == 'sitewide') && swf_element) {
			
			
			if (swf_element_id.toLowerCase() == 'spotlight') {
				swf_element.className = 'flashReady';
			}
			if (swf_element_id.toLowerCase() == "projecthead") {
				swf_element.id = "projectHeadFlash";
				swf_element_id = "projectHeadFlash";	
			}
			if (swf_height.toString().indexOf('%') == -1) {
				swf_height = swf_height + 'px';
			}
			if (swf_width.toString().indexOf('%') == -1) {
				swf_width = swf_width + 'px';
			}
			swf_element.style.height = swf_height;
			swf_element.style.width = swf_width;
			
			insertFlash(swf_name,swf_height,swf_width,swf_element_id);
			
			
		}
	}
	showFlashElements();
}


var the_ua = navigator.userAgent.toLowerCase();
var web_kit = /webkit/.test(the_ua) ? parseFloat(the_ua.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false;

//	This function returns the <object> and <embed> tags in variable [oeTags]
function insertFlash(the_swf,the_height,the_width,the_container) {
	var flashTag;
	var container_elem = document.getElementById(the_container);
	var flash_params = { 
		play:'true', 
		quality:'high', 
		scale:'noscale', 
		menu:'false', 
		salign:'lt', 
		wmode:'transparent', 
		bgcolor:'#003942',
		type:'application/x-shockwave-flash'
		}
		
	
	if (isIE && isWin) {
		//+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		flashTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+the_width+'" height="'+the_height+'">';
		flashTag += '<param name="movie" value="'+ the_swf +'" />';
		
		for (var i in flash_params) {
			if (i != 'type') {
				flashTag += '<param name="'+ i +'" value="'+ flash_params[i] +'" />';
			}
		}
		
		flashTag += '</object>';
		
		container_elem.innerHTML = flashTag;
		
	} else if (web_kit && web_kit < 312) {
		var flash_object = document.createElement('embed');
		flash_object.setAttribute('src', the_swf);
		flash_object.setAttribute('height', the_height);
		flash_object.setAttribute('width', the_width);
		
		for (var i in flash_params) {
			flash_object.setAttribute(i, flash_params[i]);
		}
		
		while(container_elem.hasChildNodes()) {
			container_elem.removeChild(container_elem.lastChild);
		}
		container_elem.appendChild(flash_object);
		
	} else {
		var flash_object = document.createElement('object');
		flash_object.setAttribute('data', the_swf);
		flash_object.setAttribute('height', the_height);
		flash_object.setAttribute('width', the_width);
		
		//flash_params.src = the_swf;
		
		for (var i in flash_params) {
			var flash_param = document.createElement('param');
			flash_param.setAttribute('name', i);	
			flash_param.setAttribute('value', flash_params[i]);
			flash_object.appendChild(flash_param);
		}
		
		while(container_elem.hasChildNodes()) {
			container_elem.removeChild(container_elem.lastChild);
		}
		container_elem.appendChild(flash_object);
	}
	container_elem.style.display = 'block';
}



function resetForm(the_form) {
	document.forms[the_form].reset();
}

function doRemove(the_page) {
	if (confirm('Are you sure you want to delete this record?')) {
		location.href = the_page;
	} else {
		return;
	}
}


//	This function is used in the Training Registration when 
//	registering multiple students from the same company
function areYouSure(the_link,student_name) {
	if (confirm('Are you sure you want to register ' + student_name + '?')) {
		location.href = the_link;
	} else {
		return;
	}
	
}






function resizeFont(class_name) {
	body_tag = document.getElementsByTagName('BODY')[0];
	body_tag.className = class_name;
	
}
//	Add "push" method for Arrays ie5 Windows
if (!Array.prototype.push) {
	Array.prototype.push = function() {
		for (var i=0; i<arguments.length; i++) {
			this[this.length] = arguments[i];
		}
		return this.length;
	}
}	







// Get the query string from the URL
function getQueryString()
{
	// Query string
	var qstring = location.search;
	
	// Is there an = sign?
	if (qstring.search(/=/) == -1 && qstring.length > 1)
	{
		// No. Fix it (for portfolio viewer mainly)
		qstring = '?query=' + qstring.slice(1, (qstring.length + 1));
	}
	
	return qstring;
}



/*
============================  GOOGLE MAPS FUNCTIONS  ============================
*/
function Gload() {
  if (GBrowserIsCompatible()) {
	var map = new GMap2(document.getElementById("googlemap"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(39.64132,-77.720509), 11);

	var name = "d'Vinci Interactive";
	var address = "28 South Potamac Street";
	var point = new GLatLng(parseFloat(39.64132),
							parseFloat(-77.720509));
	var marker = createMarker(point, name, address);
	map.addOverlay(marker);
  }
}

function createMarker(point, name, address) {
  var marker = new GMarker(point);
  var html = "<p><strong><a href=\"http://maps.google.com/maps?f=q&amp;hl=en&amp;q=d'Vinci+Interactive,+28+South+Potomac+Street+Hagerstown,+MD+21740&amp;sll=39.641312,-77.720855&amp;om=1&amp;ie=UTF8&amp;hq=d'Vinci+Interactive,&amp;hnear=28+S+Potomac+St,+Hagerstown,+MD+21740&amp;cid=545459580407609787\" onclick=\"window.open(this, 'directions'); return false;\">" + name + "</a></strong> <br />" + address + "<br />Hagerstown, MD 21740</p>";
  GEvent.addListener(marker, 'click', function() {
	marker.openInfoWindowHtml(html);
  });
  return marker;
}



	
	

