
    function root_Path(){
		var currentPath = "/";
  	    
  	    var currentUrl = document.location.href;
  	    if(
  	        !(/http:\/\/www\.ncdot\.org/i).test(currentUrl) &&
  	        !(/http:\/\/www\.ncdot\.gov/i).test(currentUrl) &&
  	        !(/http:\/\/ncdot\.org/i).test(currentUrl) &&
  	        !(/http:\/\/ncdot\.gov/i).test(currentUrl) &&
  	        !(/http:\/\/stage\//i).test(currentUrl) &&
  	        !(/http:\/\/stage\.dot\.state\.nc\.us/i).test(currentUrl) &&
  	        !(/http:\/\/apps\.dot\.state\.nc\.us/i).test(currentUrl)
  	        ){
  	        if((/https:\/\//i).test(currentUrl)){
  		        currentPath = "https://apps.dot.state.nc.us/";
  		    }else{
  		        currentPath = "http://www.ncdot.gov/";
  		    }
  	    }
  	    return currentPath;
	}
    
	if( !(/http.*?:\/\/search|http.*?:\/\/apps|http.*?:\/\/fts|http.*?:\/\/intranet/i).test(document.location.href) ){
	    //document.write('<script src="'+root_Path()+'_js/jquery_min.js"></' + 'script>');
	    document.write('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></' + 'script>');
	    document.write('<script src="'+root_Path()+'_js/jquerydotelementsmin.js"></' + 'script>');
	}
	
	//-- swfobject used not only on static side but on apps side too
	/* Apps:
	1. Prequal Application
	2. 
	3. 
	*/
	document.write('<script src="'+root_Path()+'_js/swfobject.js"></' + 'script>');
	
	//-- addEvent used on apps side
	/* Apps:
	1. SPOT List
	2. 
	3. 
	*/
	function addEvent(elm, evType, fn, useCapture){
		if(!document.getElementById)return;
    	if(elm.addEventListener){
       		elm.addEventListener(evType, fn, useCapture);
       		return true;
    	}else if(elm.attachEvent){
    		var r = elm.attachEvent("on"+evType, fn);
    		return r;
    	}else{
        	elm['on'+evType] = fn;
    	}
	}