// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
// Don't delete this header!

var message="Sorry, that function is disabled.\n\nCode Copyright ©SSS Computer Consulting\nwww.SSSComputerConsulting.com\nOur work is not Public Domain,\n and should NOT be taken from this site."; // Message for the alert box

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

// open window function start ------->
 
		function NewWnd1(n,w,h,t,l)
	{ 
	var wnd	
	var strFeatures	
		strFeatures ="width="+w+", height="+h+", top="+t+", left="+l+", resizable=0, toolbar=0, location=0, scrollbars=1, status=0, screenX="+l+", screenY="+t+"";
		wnd=window.open(n,null,strFeatures)
		}
// open window function end ---------->



// generic picture enlarge picture script starts - click anywhere to close //

var win = null;
function enlarge(image,t,l)

{
var win2
var strFeatures	
		strFeatures ="width=900, height=900, top="+t+", left="+l+", resizable=no, toolbar=no, location=no, scrollbars=no, status=no, menubar=no";

// detect browser because Micro$oft won't let you supress address bar or status bar in IE7 ... FRS 

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

// BrowserDetect.browser is now loaded with browser type for example, MSIE ... FRS
// BrowserDetect.version is now loaded with browser version for example, 7 ... FRS
// Test Browser type and version below to set number to add to popup resize height
var yourbrowser=(BrowserDetect.browser) + (BrowserDetect.version);
//alert (yourbrowser);
// next set amount to resize hieght based on browser because ie7 has extra bars ... FRS
var plus=30
if ((BrowserDetect.browser=="Explorer") && (BrowserDetect.version==7))
{
var plus=30
}

if ((BrowserDetect.browser=="Firefox"))
{
var plus=80
}

   win2=window.open('','null',strFeatures);
   win2.focus();
   win2.document.open();
   win2.document.writeln('<HTML>');
   win2.document.writeln('<HEAD>');
   win2.document.writeln('<link rel=stylesheet type=text/css href=standard.css>');
   win2.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
   win2.document.writeln('<TITLE>Click Anywhere To Close Window</TITLE>');
   win2.document.writeln('</HEAD>');
   win2.document.writeln('<BODY topmargin="0" leftmargin="0">')
   win2.document.write('<p align="center"><img onclick="self.close();" title="Click to close window" onload = "if(popup.height<800)resizeTo(popup.width+10,popup.height+')
   win2.document.write(plus);
   win2.document.write(');" name="popup" class=hand src="');
   win2.document.write(image);
   win2.document.writeln('"></p>');
   win2.document.writeln('</BODY>');
   win2.document.writeln('</HTML>');
   win2.document.close();
   }
// generic picture enlarge picture script ends


// print window function start
function printpage()
 {
 window.print()
 } 
// end print window function


// -- JavaScript for checking required fields in paypal feedback forms --

//
// next set clicked button to blank 
var clicked_button = "";
var amount=0.00;

function CheckRequiredRegister_s(form_name) {

// dump any variable for checking next
// alert('NOTE:' + form_name.os0.value);
// return false; 

// next if "view cart" button was clicked then skip edit and submit form
if (clicked_button == "view" ) {
return true; 
}

var errormessage = new String();
// Put field checks below this point.


if(WithoutContent(form_name.os0.value))
	{ errormessage += "\n\nPlease type a first name \"First Name\" text field."; }
if(WithoutContent(form_name.os1.value))
	{ errormessage += "\n\nPlease type something in the \"Last Name\" text field."; }
if(WithoutSelectionValue(form_name.os2))
	{ errormessage += "\n\nPlease select something from the \"Meal\" drop down menu."; }
if(WithoutContent(form_name.os3.value))
	{ errormessage += "\n\nPlease type something in the \"Channel Funds\" text field."; }


// Put field checks above this point.


if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}

// varsity athlete check and price adjustment for foursome is next
if(form_name.os4.checked)  
{ 
form_name.amount.value=100.00;
}
else
{ 
form_name.amount.value=150.00;
}


// dump any variable for checking next
// alert('NOTE:' + form_name.os4.value);
// return false; 


	return true;
	}
// end of function CheckRequiredRegister_s()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}




// --

function CheckRequiredRegister_f(form_name) {

// dump any variable for checking next
// alert('NOTE:' + form_name.os0.value);
// return false; 

// next if "view cart" button was clicked then skip edit and submit form
if (clicked_button == "view" ) {
return true; 
}

var errormessage = new String();
// Put field checks below this point.


if(WithoutContent(form_name.os0.value))
	{ errormessage += "\n\nPlease type a first name \"Golfer-1 First Name\" text field."; }
if(WithoutContent(form_name.os1.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-1 Last Name\" text field."; }
if(WithoutSelectionValue(form_name.os2))
	{ errormessage += "\n\nPlease select something from the \"Golfer-1 Meal\" drop down menu."; }
if(WithoutContent(form_name.os3.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-1 Channel Funds\" text field."; }

if(WithoutContent(form_name.os4.value))
	{ errormessage += "\n\nPlease type a first name \"Golfer-2 First Name\" text field."; }
if(WithoutContent(form_name.os5.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-2 Last Name\" text field."; }
if(WithoutSelectionValue(form_name.os6))
	{ errormessage += "\n\nPlease select something from the \"Golfer-2 Meal\" drop down menu."; }
if(WithoutContent(form_name.os7.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-2 Channel Funds\" text field."; }

if(WithoutContent(form_name.os8.value))
	{ errormessage += "\n\nPlease type a first name \"Golfer-3 First Name\" text field."; }
if(WithoutContent(form_name.os9.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-3 Last Name\" text field."; }
if(WithoutSelectionValue(form_name.os10))
	{ errormessage += "\n\nPlease select something from the \"Golfer-3 Meal\" drop down menu."; }
if(WithoutContent(form_name.os11.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-3 Channel Funds\" text field."; }

if(WithoutContent(form_name.os12.value))
	{ errormessage += "\n\nPlease type a first name \"Golfer-4 First Name\" text field."; }
if(WithoutContent(form_name.os13.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-4 Last Name\" text field."; }
if(WithoutSelectionValue(form_name.os14))
	{ errormessage += "\n\nPlease select something from the \"Golfer-4 Meal\" drop down menu."; }
if(WithoutContent(form_name.os15.value))
	{ errormessage += "\n\nPlease type something in the \"Golfer-4 Channel Funds\" text field."; }



// Put field checks above this point.


if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}



// dump any variable for checking next
// alert('NOTE:' + form_name.os16.value);
// return false; 

// varsity athlete check and price adjustment for foursome is next
if (form_name.os16.value=='1') 
{ 
form_name.amount.value=550.00;
}
else if (form_name.os16.value=='2') 
{ 
form_name.amount.value=500.00;
}
else if (form_name.os16.value=='3') 
{ 
form_name.amount.value=450.00;
}
else if (form_name.os16.value=='4') 
{ 
form_name.amount.value=400;
}
else
{ 
form_name.amount.value=600.00;
}



// dump any variable for checking next
// alert('NOTE:' + form_name.os4.value);
// return false; 


	return true;
	}
// end of function CheckRequiredRegister_f()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}

// --

function CheckRequiredWindbreaker(form_name) {

// dump any variable for checking next
// alert('you made it:' + amount);
// return false; 

// next if "view cart" button was clicked then skip edit and submit form
if (clicked_button == "view" ) {
return true; 
}

var errormessage = new String();
// Put field checks below this point.

if(WithoutSelectionValue(form_name.os0))
	{ errormessage += "\n\nPlease select a size from the dropdown list."; }
if(WithoutSelectionValue(form_name.os1))
	{ errormessage += "\n\nPlease select a colour from the dropdown list."; }
if(WithoutContent(form_name.quantity.value))
	{ errormessage += "\n\nPlease enter a valid quantity."; }
if(WithoutSelectionValue(form_name.ShipAmount))
	{ errormessage += "\n\nPlease select a delivery method from the dropdown list."; }



// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}

// size extra large price adjustment is next
if (form_name.os0.value=='XXL') 
{ 
form_name.amount.value=42.00;
}
else if (form_name.os0.value=='XXXL') 
{ 
form_name.amount.value=42.00;
}
else if (form_name.os0.value=='XXXXL') 
{ 
form_name.amount.value=42.00;
}
else
{ 
form_name.amount.value=39.00;
}


// dump any variable for checking next
// alert(form_name.ShipAmount.value);
// return false; 

if(form_name.ShipAmount.value==0.00) 
{ 
form_name.shipping2.value=0.00;
form_name.shipping.value=0.00;
}
else
{ 
form_name.shipping2.value=2.00;
form_name.shipping.value=form_name.ShipAmount.value;
}
return true;
}
// end of function CheckRequiredFieldsWindbreaker()


// --

// --

function CheckRequiredBallCap(form_name) {

// dump any variable for checking next
// alert('you made it:' + form_name.os0.value);
// return false; 

// next if "view cart" button was clicked then skip edit and submit form
if (clicked_button == "view" ) {
return true; 
}

var errormessage = new String();
// Put field checks below this point.

if(WithoutSelectionValue(form_name.os0))
	{ errormessage += "\n\nPlease select a colour from the dropdown list."; }
if(WithoutSelectionValue(form_name.ShipAmount))
	{ errormessage += "\n\nPlease select a delivery method from the dropdown list."; }
if(WithoutContent(form_name.quantity.value))
	{ errormessage += "\n\nPlease enter a valid quantity."; }



// Put field checks above this point.
if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}

// dump any variable for checking next
//alert(amount);
//return false; 


if(form_name.ShipAmount.value==0.00) 
{ 
form_name.shipping2.value=0.00;
form_name.shipping.value=0.00;
}
else
{ 
form_name.shipping2.value=1.00;
form_name.shipping.value=form_name.ShipAmount.value;
}
return true;
}
// end of function CheckRequiredBallCap()


// --

// -- JavaScript for checking required fields in paypal feedback forms --

//
// next set clicked button to blank 

function CheckRequiredRegister_hockey(form_name) {

// dump any variable for checking next
// alert('NOTE:' + form_name.os2.value);
// return false; 

var errormessage = new String();
// Put field checks below this point.


if(WithoutContent(form_name.os0.value))
	{ errormessage += "\n\nPlease type a first name \"First Name\" text field."; }
if(WithoutContent(form_name.os1.value))
	{ errormessage += "\n\nPlease type something in the \"Last Name\" text field."; }
if(WithoutContent(form_name.os2.value))
	{ errormessage += "\n\nPlease enter something in \"Years Played\" text field."; }

// Put field checks above this point.


if(errormessage.length > 2) {
	alert('NOTE:' + errormessage);
	return false;
	}


	return true;
	}
// end of function CheckRequiredRegister_hockey()


function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { return false; }
		}
	}
return true;
}




// --




//  scrolling banner script start ---------------------------->   
    // ================================================ //
    // Typing Banner v1.1 by Elton Kong (2000/05/01).   //
    // (c)1998-2000 Elton Kong. All Rights Reserved.    //
    // You can freely use or modify the script, as long //
    // as this message is kept intact in the source.    //
    //                                                  //
    // Contact me by:                                   //
    // elton@graffiti.net                               //
    // http://home.netvigator.com/~freya/               //
    // ================================================ //

    // banner messages
    // interval between message advancement
    // interval between character advancement
    // index of message pointer
    // index of character pointer
    var TB_msg, TB_msg_delay, TB_char_delay, TB_msg_index, TB_char_index;

    function TB_runBanner() {
      document.TB_f.t.value+=TB_msg[TB_msg_index].charAt(TB_char_index);

      if (TB_char_index<(TB_msg[TB_msg_index].length-1)) {
        TB_char_index++;
        setTimeout("TB_runBanner()", TB_char_delay);
      } else {
        TB_msg_index =(TB_msg_index+1)%TB_msg.length;
        TB_char_index=0;
        setTimeout("TB_startBanner()", TB_msg_delay);
      }
    }

    function TB_startBanner() {
      document.TB_f.t.value="";
      TB_runBanner();
    }

    function TB_initBanner() {
      TB_msg   = new Array();

      TB_msg[0]="2010 RRHA Golf Day Slated for Granite Ridge, Tuesday July 27th ...";
      TB_msg[1]="Play Either Stroke Play or Scramble Format ... Random Prizes...";
      TB_msg[2]="Net Proceeds Go To support Ryerson Hockey Program...";
      TB_msg[3]="2010 Hockey Alumni Game played on January 23, 2010...";
      TB_msg[4]="RRHA Rookie Daniel Care pots 4 goals and 2 assists...";
      TB_msg[5]="Team Blue finally pulls out a win after 6 year draught...";
      
      
                  
      TB_msg_delay =3500; // milli-seconds
      TB_char_delay=50;  // milli-seconds

      TB_msg_index =0;
      TB_char_index=0;

      TB_startBanner();
    }

    // ================= //
    // End Typing Banner //
    // ================= //
//  scrolling banner script end ---------------------------->   



