// ==============================
// Web Mail Domain Generators
// ==============================

var sdomain='trinitylacrosse.com';
var email='webmaster';
var myaddress= email+'@'+sdomain+'';
var click='Webmaster';

var sdomain='sbcglobal.net';
var email='yankee.22';
var myaddress2= email+'@'+sdomain+'';
var click2='Scott Baxter';

var sdomain='marino.ws';
var email='lax';
var myaddress4= email+'@'+sdomain+'';
var click4='Ralph Marino';

var sdomain='tx.rr.com';
var email='kay.campbell';
var myaddress5= email+'@'+sdomain+'';
var click5='Kay Campbell';

var sdomain='';
var email='';
var myaddress6= email+'@'+sdomain+''; 
var click6='Francis Swift';

var sdomain='';
var email='';
var myaddress7= email+'@'+sdomain+''; 
var click7='Krista Hood';

var sdomain='tx.rr.com';
var email='kay.campbell';
var myaddress8= email+'@'+sdomain+'';
var click8='Kay Campbell';

var sdomain='hebisd.edu';
var email='ewartb';
var myaddress9= email+'@'+sdomain+''; 
var click9='Becky Ewert';

var sdomain='hebisd.edu';
var email='bryank';
var myaddress10= email+'@'+sdomain+''; 
var click10='Kathy Bryan';

var sdomain='hebisd.edu';
var email='ewartb';
var myaddress11= email+'@'+sdomain+''; 
var click11='Becky Ewart';

var sdomain='tx.rr.com';
var email='kay.campbell';
var myaddress12= email+'@'+sdomain+'';
var click12='Kay Campbell';

var sdomain='trinitylacrosse.com';
var email='coachmarc';
var myaddress12= email+'@'+sdomain+'';
var click12='Marc Wilson';

// ==================
// Hidden Functions
// ==================

function hidestatus(){
window.status='Done'
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}


// ==================
// Form Validator
// ==================

function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("Name", "Age", "Height", "Weight", "School", "Email", "Phone", "Sports", "Experience", "Comments");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Name", "Age", "Height", "Weight", "School", "Email", "Phone", "Sports", "Experience", "Comments");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}


// ==================
// Text Scroller
// ==================

var pausecontent=new Array()
pausecontent[0]='Platinum:<p>Larry Miller Roofing<br>(972) 988-0941, 520 Fountian Parkway, Grand Prairie TX 75050<p>Silver:<p>My Jeweler (817) 283-0744, 2900 Highway 121 Suite 135, Bedford TX 76021<p>USA Shade and Fabric Structures (214) 905-9514, 8319 Chancellor Row, Dallas TX 75247<p>Recon Pest Control, LLC<br>(817) 282-0584, 6209 Winter Park Dr. N Richland Hills TX. 76180<p>P&G Creative Photography (682) 225-4540, 3313 Cypress Ct. Bedford, TX 76021<p>Bronze:<p>DICKIE\'S Barbecue Pit<br>(817) 354-5551, 501 N Industrial Blvd, Bedford Tx, 76021<p>E&E Photography<br>(817) 282-0584, 301 Westover Ct. Hurst TX, 76054<p>Patrons:<p>Burger Box<p>Trophies & More<p>Chibli Stone Works/Eduardo & Maricela Chibli<p>Booster:<p>Antonina Skotarek & Varvara Woodard<p>Stitch \'N Tyme Embroidery<p>West Creations<p>Angie & Joe Delagarza<p>Irma Kroliki & Aurelia Delagarza<p>JD & Katrean Porter<p>Ramiro & Renee Delagarza<p>Jack & Rechille Gourley<p>'
pausecontent[1]='Platinum:<p>Larry Miller Roofing<br>(972) 988-0941, 520 Fountian Parkway, Grand Prairie TX 75050<p>Silver:<p>My Jeweler (817) 283-0744, 2900 Highway 121 Suite 135, Bedford TX 76021<p>USA Shade and Fabric Structures (214) 905-9514, 8319 Chancellor Row, Dallas TX 75247<p>Recon Pest Control, LLC<br>(817) 282-0584, 6209 Winter Park Dr. N Richland Hills TX. 76180<p>P&G Creative Photography (682) 225-4540, 3313 Cypress Ct. Bedford, TX 76021<p>Bronze:<p>DICKIE\'S Barbecue Pit<br>(817) 354-5551, 501 N Industrial Blvd, Bedford Tx, 76021<p>E&E Photography<br>(817) 282-0584, 301 Westover Ct. Hurst TX, 76054<p>Patrons:<p>Burger Box<p>Trophies & More<p>Chibli Stone Works/Eduardo & Maricela Chibli<p>Booster:<p>Antonina Skotarek & Varvara Woodard<p>Stitch \'N Tyme Embroidery<p>West Creations<p>Angie & Joe Delagarza<p>Irma Kroliki & Aurelia Delagarza<p>JD & Katrean Porter<p>Ramiro & Renee Delagarza<p>Jack & Rechille Gourley<p>'

/***********************************************
* Pausing up-down scroller
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=0 //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden; height: 80%"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 3000)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*0)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}

// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 150) // <---- Controls speed of scroller 
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

// -------------------------------------------------------------------
// Blinking Text for Youth Lacrosse
// -------------------------------------------------------------------

window.onerror = null;
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS4 = (bName == "Netscape" && bVer >= 4);
 var IE4 = (bName == "Microsoft Internet Explorer" 
 && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" 
 && bVer < 4);
 var blink_speed=175;
 var i=0;
 
if (NS4 || IE4) {
 if (navigator.appName == "Netscape") {
 layerStyleRef="layer.";
 layerRef="document.layers";
 styleSwitch="";
 }else{
 layerStyleRef="layer.style.";
 layerRef="document.all";
 styleSwitch=".style";
 }
}

//BLINKING
function Blink(layerName){
 if (NS4 || IE4) { 
 if(i%2==0)
 {
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.visibility="visible"');
 }
 else
 {
 eval(layerRef+'["'+layerName+'"]'+
 styleSwitch+'.visibility="hidden"');
 }
 } 
 if(i<1)
 {
 i++;
 } 
 else
 {
 i--
 }
 setTimeout("Blink('"+layerName+"')",blink_speed);
}
