// JavaScript Document

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=450,left = 290,top = 287');");
}

    	var scrollCounter = 0;
    	var scrollText    = " Welcome To Peel Panto Players.                                                                                                                          Entertaining People in Brampton and The Surrounding Areas for 30 years";
    	var scrollDelay   = 90;
    	var i = 0;
	
    	while (i ++ < 140)
   	    scrollText = " " + scrollText;

 	function Scroller()
   {
        window.status = scrollText.substring(scrollCounter++,
          scrollText.length);
        if (scrollCounter == scrollText.length)
          scrollCounter = 0;
        setTimeout("Scroller()", scrollDelay);
    }

    Scroller();


<!--
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 

<!--
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")



function memWin(URLtoOpen, windowName, windowFeatures){
					window.open(URLtoOpen, windowName, windowFeatures);
				}
function Login(){
	var done=0;
	var username=document.login.username.value;
	var password=document.login.password.value;
	
	username=username.toLowerCase();
	password=password.toLowerCase();
	
	if (username=="member" && password=="panto") {memWin("news.htm","member","width=650,height=400,scrollbars=yes,resizable=no,toolbar-no,menubar=no"); done=1;}
	if (username=="peel" && password=="panto") {memWin("news.htm","member","width=650,height=400,scrollbars=yes,resizable=no,toolbar-no,menubar=no"); done=1;}
	if (username=="gioi" && password=="panto") {memWin("news.htm","member","width=650,height=400,scrollbars=yes,resizable=no,toolbar-no,menubar=no"); done=1;}
	if (username=="john" && password=="password") {memWin("news.htm","member","width=650,height=400,scrollbars=yes,resizable=no,toolbar-no,menubar=no,top=0,left=0"); done=1;}
	if (done==0) { 
		alert("Invalid login, please try again!"); 
	} else {
		window.close();
	}
}
// End -->

<!--
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}


//FORM VALIDATION
//<input type=hidden name="required" value="Company,City,Country,FirstName,LastName,Phone,Email,Information Required On The Following">

function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("FirstName","LastName","Phone","email","Date_Of_Production","Show_Time_Requested","Comments");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("First Name","Last Name","Phone Number","E-mail Address","Date Of Production Requested","Show Time Requested","Comments");
	// dialog message
	var alertMsg = "To submit this form, the following fields must be completed:\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;
	}
}
// -->

