// JavaScript Document

<!-- hide script from old browsers


function resizeWindow()
{
top.resizeBy(-300,-300)
}



function disp_prompt()
  {
  var name=prompt("Please enter your first name")
  if (name!=null && name!="")
    {
    document.write("Hello " + name + "! Thank you for visiting the St. Pius Culinary X Institute website! We hope you'll find the information you're looking for. If not, please call us at (514)381-5440 or e-mail us at amancini@emsb.qc.ca with your program inquiries. Click the back button to return to the home page.")
    }
  }



	var temp = "";
	var image1 = 'images/holding_plate.jpg';
	var image2 = 'images/student_winners.jpg';
	var image3 = 'images/pastry_students.jpg'
	
	


message="Enrol now in Cuisine du Marché/Market Fresh Cooking!"
                                         
pos=0
maxlength=message.length+1

function writemsg()
{
if (pos<maxlength)
	{
	txt=message.substring(pos,0)
	document.forms[0].msgfield.value=txt
	pos++ 
	timer=setTimeout("writemsg()", 50)
	}
}
function stoptimer()
{
clearTimeout(timer)
}



function check(browser)
  {
  document.getElementById("answer").value=browser
  }

function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden"
}



function validate()
{
var at=document.getElementById("email").value.indexOf("@")
var numberpersons=document.getElementById("numberpersons").value
var firstname=document.getElementById("firstname").value
var lastname=document.getElementById("lastname").value
submitOK="true"

if (firstname.length>10)
 {
 alert("The first name must be less than 10 characters")
 submitOK="false"
 }
 if (lastname.length>10)
 {
 alert("The last name must be less than 10 characters")
 submitOK="false"
 }
 
if (isNaN(numberpersons)||numberpersons<1||numberpersons>8)
 {
 alert("The number of persons in your party must be between 1 and 8")
 submitOK="false"
 }
 
if (at==-1) 
 {
 alert("Not a valid e-mail!")
 submitOK="false"
 }
if (submitOK=="false")
 {
 return false
 }
}


function moveover()
{
document.getElementById('image').width="300"
document.getElementById('image').height="269"
}
function moveback()
{
document.getElementById('image').width="250"
document.getElementById('image').height="224"
}

// end hiding script from old browsers -->


















