	<!-- 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) {
	
	TB_Image1_R = new Image(168, 320);
	TB_Image1_R.src="images/TB_Image1_R.jpg";
	TB_Image1_O = new Image(168, 320);
	TB_Image1_O.src="images/TB_Image1_O.jpg";		
	
	TB_Image2_R = new Image(168, 320);
	TB_Image2_R.src="images/TB_Image2_R.jpg";
	TB_Image2_O = new Image(168, 320);
	TB_Image2_O.src="images/TB_Image2_O.jpg";		
	
	TB_Image3_R = new Image(168, 320);
	TB_Image3_R.src="images/TB_Image3_R.jpg";
	TB_Image3_O = new Image(168, 320);
	TB_Image3_O.src="images/TB_Image3_O.jpg";		

	TB_Image4_R = new Image(168, 320);
	TB_Image4_R.src="images/TB_Image4_R.jpg";
	TB_Image4_O = new Image(168, 320);
	TB_Image4_O.src="images/TB_Image4_O.jpg";	
	
	DashImg = new Image(8, 8);
	DashImg.src="images/SideNavDash.gif";
	ClearImg = new Image(8, 8);
	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/' + 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/' + imgName + '_R.' + GorJ;
		el.src = img.src;		
	}	
	
	
		
	function Add_To_Favorites() 
	{ 
	    var URL;
	    var PageName;
	    var el;

	    URL = location.href;
	    el = FindMyControl('hdTitle');
	    PageName = 'Square Seven - ' + el.value;

        if (window.sidebar) window.sidebar.addPanel(PageName, URL,"");

        else if( window.opera && window.print )
        {
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',URL);
        mbm.setAttribute('title',PageName);
        mbm.click();
        }

        else if( document.all ) window.external.AddFavorite( URL, PageName);

}


	
	

	function Print_Page() {
	
        window.print();
        
	}		
	
	function Email_Page() {
		var Loc = "EmailPage.aspx?Link=" + escape(location.href)
		var w = 	window.open(Loc, 'EmailPage', 'width=350,height=420,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,top=100,left=100');
		w.focus();
	}	
	
	function NewWin(Link) {
		var w = 	window.open(Link, 'NewWin');
		w.focus();
	}			

     
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 dumb-ass name ASP.Net creates.
	// First scan through all of the input elements and look for our control
    frmElements=document.getElementsByTagName('input');
    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 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 textarea 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 textarea 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 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] }
    }        
   
    return false;         

}       


	function RollMiddle(imgName) {
		
		var el = document.getElementById(imgName);
		if (el != null) {
			el.src = eval(imgName + "_O.src");
			if (imgName == 'TB_Image1') { clearTimeout(tmr1); Cnt1 = 0; if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = 100 } else { el.style.MozOpacity = 1 } }
			if (imgName == 'TB_Image2') { clearTimeout(tmr2); Cnt2 = 0; if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = 100 } else { el.style.MozOpacity = 1 } }
			if (imgName == 'TB_Image3') { clearTimeout(tmr3); Cnt3 = 0; if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = 100 } else { el.style.MozOpacity = 1 }}
			if (imgName == 'TB_Image4') { clearTimeout(tmr4); Cnt4 = 0; if (navigator.appName.indexOf("Microsoft") != -1) { el.filters.alpha.opacity = 100 } else { el.style.MozOpacity = 1 }}
		}
	}
	
	function UnRollMiddle_All() {
		var el;
		
		el = document.getElementById('TB_Image1');
		if (el != null) {
			el.src = TB_Image1_R.src
		}			
		el = document.getElementById('TB_Image2');
		if (el != null) {
			el.src = TB_Image2_R.src
		}	
		el = document.getElementById('TB_Image3');
		if (el != null) {
			el.src = TB_Image3_R.src
		}	
		el = document.getElementById('TB_Image4');
		if (el != null) {
			el.src = TB_Image4_R.src
		}			
		
	}
	
	function UnRollMiddle(imgName) {	
	
		var el = document.getElementById(imgName);
		if (el != null) {
			Set_Up_Counter(imgName)
			//el.src = eval(imgName + "_R.src");
		}
	}

var tmr1;	
var tmr2;
var tmr3;
var tmr4;	
var Cnt1;
var Cnt2;
var Cnt3;
var Cnt4;
var Op1;
var Op2;
var Op3;
var Op4;
				
function Set_Up_Counter(imgName) {

    if (imgName == 'TB_Image1') { clearTimeout(tmr1); tmr1 = setTimeout('Count_Down1()', 100); Cnt1 = 0; Op1 = 100; }
	if (imgName == 'TB_Image2') { clearTimeout(tmr2); tmr2 = setTimeout('Count_Down2()', 100); Cnt2 = 0; Op2 = 100; }
	if (imgName == 'TB_Image3') { clearTimeout(tmr3); tmr3 = setTimeout('Count_Down3()', 100); Cnt3 = 0; Op3 = 100; }
	if (imgName == 'TB_Image4') { clearTimeout(tmr4); tmr4 = setTimeout('Count_Down4()', 100); Cnt4 = 0; Op4 = 100;}
}	

function Count_Down1() {

		Cnt1 = Cnt1 + 1;
		if (Cnt1 > 12) {
			var el = document.getElementById('TB_Image1');
			if (el != null) {
				// fade the image out
				if (Cnt1 < 18) {
					Op1 = Op1 - 15;
					el.style.opacity=Op1 / 100;                      
                    el.style.MozOpacity=Op1 / 100;                   
                    el.style.filter='alpha(opacity='+Op1+')'; 
					}
				// swap the image back to orig
				if (Cnt1 == 18 ) { el.src = TB_Image1_R.src }
				// fade the image back in
				if (Cnt1 > 18) {
					Op1 = Op1 + 15;
					el.style.opacity=Op1 / 100;                      
                    el.style.MozOpacity=Op1/ 100;                   
                    el.style.filter='alpha(opacity='+Op1+')'; 
					}				
				}
			}
		if (Cnt1 > 25) {
			clearTimeout(tmr1);
			Cnt1 = 0;
			Op1 = 100;
			return;	
		}
			
		tmr1 = setTimeout('Count_Down1()', 100);
	}	

function Count_Down2() {

		Cnt2 = Cnt2 + 1;
		if (Cnt2 > 12) {
			var el = document.getElementById('TB_Image2');
			if (el != null) {
				// fade the image out
				if (Cnt2 < 18) {
					Op2 = Op2 - 15;
					el.style.opacity=Op2 / 100;                      
                    el.style.MozOpacity=Op2 / 100;                   
                    el.style.filter='alpha(opacity='+Op2+')'; 
					}
				// swap the image back to orig
				if (Cnt2 == 18 ) { el.src = TB_Image2_R.src }
				// fade the image back in
				if (Cnt2 > 18) {
					Op2 = Op2 + 15;
					el.style.opacity=Op2 / 100;                      
                    el.style.MozOpacity=Op2 / 100;                   
                    el.style.filter='alpha(opacity='+Op2+')'; 
					}				
				}
			}
		if (Cnt2 > 25) {
			clearTimeout(tmr2);
			Cnt2 = 0;
			Op2 = 100;
			return;	
		}
			
		tmr2 = setTimeout('Count_Down2()', 100);
	}			

function Count_Down3() {
		Cnt3 = Cnt3 + 1;
		if (Cnt3 > 12) {
			var el = document.getElementById('TB_Image3');
			if (el != null) {
				// fade the image out
				if (Cnt3 < 18) {
					Op3 = Op3 - 15;
					el.style.opacity=Op3 / 100;                      
                    el.style.MozOpacity=Op3 / 100;                   
                    el.style.filter='alpha(opacity='+Op3+')'; 
					}
				// swap the image back to orig
				if (Cnt3 == 18 ) { el.src = TB_Image3_R.src }
				// fade the image back in
				if (Cnt3 > 18) {
					Op3 = Op3 + 15;
					el.style.opacity=Op3 / 100;                      
                    el.style.MozOpacity=Op3/ 100;                   
                    el.style.filter='alpha(opacity='+Op3+')'; 
					}				
				}
			}
		if (Cnt3 > 25) {
			clearTimeout(tmr3);
			Cnt3 = 0;
			Op3 = 100;
			return;	
		}
			
		tmr3 = setTimeout('Count_Down3()', 100);
	}			
	
function Count_Down4() {
		Cnt4 = Cnt4 + 1;
		if (Cnt4 > 12) {
			var el = document.getElementById('TB_Image4');
			if (el != null) {
				// fade the image out
				if (Cnt4 < 18) {
					Op4 = Op4 - 15;
					el.style.opacity=Op4 / 100;                      
                    el.style.MozOpacity=Op4 / 100;                   
                    el.style.filter='alpha(opacity='+Op4+')'; 
					}
				// swap the image back to orig
				if (Cnt4 == 18 ) { el.src = TB_Image4_R.src }
				// fade the image back in
				if (Cnt4 > 18) {
					Op4 = Op4 + 15;
					el.style.opacity=Op4 / 100;                      
                    el.style.MozOpacity=Op4 / 100;                   
                    el.style.filter='alpha(opacity='+Op4+')'; 
					}				
				}
			}
		if (Cnt4 > 25) {
			clearTimeout(tmr4);
			Cnt4 = 0;
			Op4 = 100;
			return;	
		}
			
		tmr4 = setTimeout('Count_Down4()', 100);
	}			
	
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 SendEmail() {

    var el;
    var OkToGo = true;
   
    el = FindMyControl('txtYour_Email');
    if (validEmail(el.value) == false) { OkToGo = false; alert('Please enter a valid email.'); }
    
    if (OkToGo) { el.form.submit(); }

}

