	<!-- Begin
	/* This script and many more are available free online at
	The JavaScript Source!! http://javascript.internet.com
	Created by: Ultimater :: http://ultimiacian.tripod.com/
	Add this snippet to the very beginning of your script. */

	if(!document.getElementById){
	if(document.all)
	document.getElementById=function(){
		if(typeof document.all[arguments[0]]!="undefined")
		return document.all[arguments[0]]
		else
		return null
	}
	else if(document.layers)
	document.getElementById=function(){
		if(typeof document[arguments[0]]!="undefined")
		return document[arguments[0]]
		else
		return null
	}
	}
	// End -->

	browserName=navigator.appName;
	browserVer=parseInt(navigator.appVersion);
	
	if (browserVer > 2) {
	
	Solutions_R = new Image(97, 34);
	Solutions_R.src="images/Solutions_R.gif";
	Solutions_O = new Image(97, 34);
	Solutions_O.src="images/Solutions_O.gif";	

	Partners_R = new Image(103, 34);
	Partners_R.src="images/Partners_R.gif";
	Partners_O = new Image(103, 34);
	Partners_O.src="images/Partners_O.gif";			
	
	About_R = new Image(82, 34);
	About_R.src="images/About_R.gif";
	About_O = new Image(82, 34);
	About_O.src="images/About_O.gif";				
	
	CaseStudies_R = new Image(127, 34);
	CaseStudies_R.src="images/CaseStudies_R.gif";
	CaseStudies_O = new Image(127, 34);
	CaseStudies_O.src="images/CaseStudies_O.gif";					
	
	Blog_R = new Image(74, 34);
	Blog_R.src="images/Blog_R.gif";
	Blog_O = new Image(74, 34);
	Blog_O.src="images/Blog_O.gif";		
						
	DashImg = new Image(5, 9);
	DashImg.src="images/SideNavDash.gif";
	ClearImg = new Image(5, 9);
	ClearImg.src="images/Clear.gif";
	

}


	function Dash_Roll(imgName) {
		var el = document.getElementById(imgName);
		if (el != null) {
				el.src = DashImg.src;
		}
	}
		
	function Dash_UnRoll(imgName) {
		var el = document.getElementById(imgName);
		if (el != null) {
				el.src = ClearImg.src;
		}

	}		
	
	function RollIt(imgName) {
		var el = document.getElementById(imgName);
		el.src = eval(imgName + "_O.src");
		
    }
	
	function UnRollIt(imgName) {
		var el = document.getElementById(imgName);
		el.src = eval(imgName + "_R.src");
	}
	
	function RollIt_v2(imgName, DDFS, GorJ) {
	
		var el = document.getElementById(imgName);
		var img = new Image();
		img.src = DDFS + 'images/CloudConfig/' + imgName + '_O.' + GorJ;
		el.src = img.src;
	}
	
	function UnRollIt_v2(imgName, DDFS, GorJ) {
	
		var el = document.getElementById(imgName);
		var img = new Image();
		img.src = DDFS + 'images/CloudConfig/' + imgName + '_R.' + GorJ;
		el.src = img.src;
		
	}	
	
	

function FindMyControl(MyID) {

	var frmElements,i,t,ctl;
		
	// Since the use of master pages mangles the names of child controls, we need a method 
	// of searching through the form elements and returning a reference to the control we are 
	// looking for that control by the name we know it as instead of the name ASP.Net creates.
	// First scan through all of the input elements and look for our control

	var tempMyID;
	tempMyID = MyID + '***';
    frmElements=document.getElementsByTagName('input');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t + '***';
        //alert(t + ' - ' + tempMyID);
        if (t.indexOf(tempMyID) > -1 )
            { return frmElements[i] }
    }   
    
   // Still not found, scan through all of the select elements
    frmElements=document.getElementsByTagName('select');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    } 
   
   // Still not found, scan through all of the textarea elements
    frmElements=document.getElementsByTagName('textarea');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    }   
   
   // Still not found, scan through all of the iframe elements
    frmElements=document.getElementsByTagName('td');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    }         
   
   // Still not found, scan through all of the span elements
    frmElements=document.getElementsByTagName('div');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    } 
    
   // Still not found, scan through all of the iframe elements
    frmElements=document.getElementsByTagName('img');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    } 
    
   // Still not found, scan through all of the span elements
    frmElements=document.getElementsByTagName('table');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    } 
          
    
   // Still not found, scan through all of the iframe elements
    frmElements=document.getElementsByTagName('iframe');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    }       
   
   // Still not found, scan through all of the span elements
    frmElements=document.getElementsByTagName('span');
    for(i in frmElements)
    {
        t = String(frmElements[i].id); 
        t = '_' + t;
        if (t.indexOf(MyID) > -1 )
            { return frmElements[i] }
    }  
   
  return false;  

}

function SubmitContactUs() {

    var el;
    
    el = FindMyControl('txtFirst_Name');
    if ( el.value.length <= 1 ) { alert('First Name is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }
    el = FindMyControl('txtLast_Name');
    if ( el.value.length <= 1 ) { alert('Last Name is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }
    el = FindMyControl('txtCompany');
    if ( el.value.length <= 1 ) { alert('Company is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }    
    el = FindMyControl('txtTitle');
    if ( el.value.length <= 1 ) { alert('Title is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }        
    el = FindMyControl('txtEmail');
    if ( el.value.length <= 4 ) { alert('Email is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }            
    el = FindMyControl('txtPhone');
    if ( el.value.length <= 4 ) { alert('Phone is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }                
    el = FindMyControl('txtCity');
    if ( el.value.length <= 2 ) { alert('City is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }                    
    el = FindMyControl('selPrefMethod');
    if ( el.selectedIndex == 0 ) { alert('Preferred Contact Method is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }                    
    el = FindMyControl('txtServiceDate');
    if ( el.value.length <= 4 ) { alert('Service Date is a required field in order to contact us.  Please go back and provide a value for this item.'); return; }                
        
    el.form.submit();
    
}

function popUp(url)
{
         playerW=1000 
         playerH=600
         popupx = Math.round((screen.availWidth-playerW)/2);
         popupy = Math.round((screen.availHeight-playerH)/2);
         prop='width='+playerW+',height='+playerH+',scrollbars=no,left='+popupx+',top='+popupy+',resizable=no';
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(url, '" + id + "','"+ prop+"');");
         

}


function ShowRegForm(EV_ID) {

    var el,left,top,html,el2;
    var imageName;
   
   el = FindMyControl("hdEV_ID");
   el.value = EV_ID;
   
    // find our ref image for positioning     
    el = document.getElementById('imgNav_Start');
    if (el != null) {
         t = findPos(el);
         left = parseInt(t[0]);
         top = parseInt(t[1]);
    }  
    else {
        left = 100;  
        top = 100; 
    }       

    left = left + 400;
    left = String(left) + 'px';
    top = top + 100;
    top = String(top) + 'px';
 
   
    // show the menu panel
    el2 = FindMyControl('divRegisterFormContainer');
	el2.style.left = left; 
	el2.style.top = top;    
  
}

function HideRegisterForm() {

    var el2;
    
    // hide the menu panel
    el2 = FindMyControl('divRegisterFormContainer');
	el2.style.left = '-1200px'; 

}

function SubmitRegisterForm() {

    var el;
    
    el = FindMyControl('txtRF_Company');
    if ( el.value.length <= 2 ) { alert('Company is a required field in order to register.  Please go back and provide a value for this item.'); return; }    
    el = FindMyControl('txtRF_Name');
    if ( el.value.length <= 3 ) { alert('Name is a required field in order to register.  Please go back and provide a value for this item.'); return; }    
    el = FindMyControl('txtRF_Email');
    if ( validEmail(el.value) == false ) { alert('Email is a required field in order to register.  Please go back and provide a value for this item.'); return; }            
        
    el.form.submit();

}



function validEmail(email) 
{
     var invalidChars = " /:,;"; // NOTE - first char is a SPACE

     for (i = 0;  i < invalidChars.length; i++) { // does it contain any invalid characters?
          var badChar = invalidChars.charAt(i);
          if (email.indexOf(badChar, 0) > -1) return false;
     }

     var atPos = email.indexOf("@", 1);  // there must be one "@" symbol
     if (atPos == -1) return false;
     // and only one "@" symbol
     if (email.indexOf("@", atPos + 1) != -1) return false;

     periodPos = email.indexOf(".", atPos);
     // and at least one "." after the "@"
     if (periodPos == -1) return false;
     // must be at least 2 characters after the "."
     if (periodPos + 3 > email.length)  return false;

     return true;
}

function ShowLayeredPopUp(Mode) {

    var el,left,top,html,el2,MyScrollTop;
    var imageName;
         
    // find our ref image for positioning     
    el = document.getElementById('imgNav_Start');
    if (el != null) {
         t = findPos(el);
         left = parseInt(t[0]);
         top = parseInt(t[1]);
    }  
    else {
        left = 100;  
        top = 100; 
    }       
    
	// adjust for scroll position
	if (document.documentElement && !document.documentElement.scrollTop)   // IE6 +4.01 but no scrolling going on
        { MyScrollTop = 0 }    
    else if (document.documentElement && document.documentElement.scrollTop)  // IE6 +4.01 and user has scrolled
        { MyScrollTop = document.documentElement.scrollTop }   
    else if (document.body && document.body.scrollTop) // IE5 or DTD 3.2
        { MyScrollTop = document.body.scrollTop }   
	top = top + MyScrollTop;
    
    left = left + 400;
    left = String(left) + 'px';
    top = top + 100;
    top = String(top) + 'px';
 
   
    // show the menu panel
    el2 = FindMyControl('divLayeredPopUp');
	el2.style.left = left; 
	el2.style.top = top;    
	
	if ( Mode == 'Prologue' ) {
	    el2.innerHTML = '<object width="480" height="390"><param name="movie" value="http://www.xtranormal.com/site_media/players/jwplayer.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="flashvars"value="height=390&width=480&file=http://newvideos.xtranormal.com/web_final_lo/306532e6-048e-11e0-9451-003048d6740d_24.mp4&image=http://newvideos.xtranormal.com/web_final_lo/306532e6-048e-11e0-9451-003048d6740d_24.jpg&link=http://www.xtranormal.com/watch/8113141&searchbar=false&autostart=false"/><embed src="http://www.xtranormal.com/site_media/players/jwplayer.swf" width="480" height="390" allowscriptaccess="always" allowfullscreen="true" flashvars="height=390&width=480&file=http://newvideos.xtranormal.com/web_final_lo/306532e6-048e-11e0-9451-003048d6740d_24.mp4&image=http://newvideos.xtranormal.com/web_final_lo/306532e6-048e-11e0-9451-003048d6740d_24.jpg&link=http://www.xtranormal.com/watch/8113141&searchbar=false&autostart=false"></embed></object><object width="480" height="390"><param name="movie" value="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf" width="1" height="1" allowscriptaccess="always"></embed></object>';
	    el2.innerHTML = el2.innerHTML + '<div style="text-align: center;"><a href="javascript: HideLayeredPopUp(true);">close</a></div>';
	 }
	 
    if ( Mode == 'Part 1' ) {
        el2.innerHTML = '<object width="480" height="390"><param name="movie" value="http://www.xtranormal.com/site_media/players/jwplayer.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="flashvars"value="height=390&width=480&file=http://newvideos.xtranormal.com/web_final_lo/5edba442-1466-11e0-9113-003048d69c21_38.mp4&image=http://newvideos.xtranormal.com/web_final_lo/5edba442-1466-11e0-9113-003048d69c21_38.jpg&link=http://www.xtranormal.com/watch/8227301&searchbar=false&autostart=false"/><embed src="http://www.xtranormal.com/site_media/players/jwplayer.swf" width="480" height="390" allowscriptaccess="always" allowfullscreen="true" flashvars="height=390&width=480&file=http://newvideos.xtranormal.com/web_final_lo/5edba442-1466-11e0-9113-003048d69c21_38.mp4&image=http://newvideos.xtranormal.com/web_final_lo/5edba442-1466-11e0-9113-003048d69c21_38.jpg&link=http://www.xtranormal.com/watch/8227301&searchbar=false&autostart=false"></embed></object><object width="480" height="390"><param name="movie" value="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.xtranormal.com/site_media/players/embedded-xnl-stats.swf" width="1" height="1" allowscriptaccess="always"></embed></object>';
        el2.innerHTML = el2.innerHTML + '<div style="text-align: center;"><a href="javascript: HideLayeredPopUp(true);">close</a></div>';
    }

}

function HideLayeredPopUp(ClearContents) {

    var el2;
    
    // hide the menu panel
    el2 = FindMyControl('divLayeredPopUp');
	el2.style.left = '-1200px'; 
	
	if ( ClearContents == true ) { el2.innerHTML = ''; }

}


function SubmitEmailRegisterForm() {

    var el;
    
    el = FindMyControl('txtER_Name');
    if ( el.value.length <= 2 ) { alert('Name is a required field in order to register.  Please go back and provide a value for this item.'); return; }    
    el = FindMyControl('txtER_Company');
    if ( el.value.length <= 2 ) { alert('Company is a required field in order to register.  Please go back and provide a value for this item.'); return; }    
    el = FindMyControl('txtER_Email');
    if ( validEmail(el.value) == false ) { alert('Email is a required field in order to register.  Please go back and provide a value for this item.'); return; }            
    el = FindMyControl('txtER_Phone');
    if ( el.value.length <= 2 ) { alert('Phone is a required field in order to register.  Please go back and provide a value for this item.'); return; }    

    el.form.submit();
    
}

var Panel_Cnt1 = 0;
var Panel_Op1 = 100;
var Panel_HeadingCnt = 2;

function Rotate_Panels() {
    	Panel_Cnt1 = Panel_Cnt1 + 1;
		if (Panel_Cnt1 > 60) {
		    var el = document.getElementById('divHmPgNewsItem');
			
			if (el != false) {
				// fade the panel out
				if (Panel_Cnt1 < 76) {
					Panel_Op1 = Panel_Op1 - 7;
					
					if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = Panel_Op1 }
						else { el.style.MozOpacity = Panel_Op1/100; el.style.opacity = Panel_Op1/100; }
					}
				// swap the panel back to orig
				if (Panel_Cnt1 == 77 ) { el.innerHTML = Panels[Panel_HeadingCnt] }
				// fade the panel back in
				if (Panel_Cnt1 > 78) {
					Panel_Op1 = Panel_Op1 + 7;
					if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = Panel_Op1 }
						else { el.style.MozOpacity = Panel_Op1/100; el.style.opacity = Panel_Op1/100;  }
					}				
				}
			}
		if (Panel_Cnt1 > 93) {
			clearTimeout(Pan_tmr1);
			Panel_Cnt1 = 0;
			Panel_Op1 = 100;
			Panel_HeadingCnt = Panel_HeadingCnt + 1;
			if (Panel_HeadingCnt >= PanelCnt) { Panel_HeadingCnt = 1 }
		}
			
		Pan_tmr1 = setTimeout('Rotate_Panels()', 100);
			
}

function GatherNGo() {

    var el;
    var URL;
    
    el = FindMyControl('searchWord');
    URL = 'search.php?keyword=' + escape(el.value);
    location.href = URL;
    
}
