var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
function getRef(id) {
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
} 

defaultStatus = "Picasso Caterers"

function init()
{
	//Set quoted message according to page
	var spage = getPageName();
//	alert(spage);
	var linktext = "";
	if (spage == "default.asp" || spage == "")
		{ linktext = "Welcome to Picasso Caterers! Please use the above links to browse our site..." } ;
		
	if (spage == "pcbusiness.asp")
		{ linktext = "&quot;We and everyone thought the catering was the best we've seen &amp; eaten; and would recommend you to anyone who wants a brilliant catering team!&quot;<br><br>C &amp; P Burge" } ;
	if (spage == "pcprivate.asp")
		{ linktext = "&quot;Thank you for all your help in making our day at the races so enjoyable. The food was delicious. We will definitely be using you again!&quot;<br><br>Chris Graham" };
	if (spage == "pcweddings.asp")
		{ linktext = "&quot;Thank you for providing such an excellent spread. The food weas superb and everybody complimented it. You both contributed to a very memorable &amp; enjoyable day&quot;<br><br>John &amp; Sylvaine Peter" } ;
	if (spage == "pcmenus.asp")
		{ linktext = "&quot;Just to say thank-you for the marvelous food that you provided for our silver wedding party. We had so many compliments about the food and the excellent service and were able to relax and enjoy the evening as a result&quot;<br><br>Ferne &amp; Roger Kern" } ;
	if (spage == "pccontact.asp")
		{ linktext = "&quot;Thank you for all your kind assistance in the arrangements and all the hard work during the surprise party for Tom. It was as you probably saw for yourselves a great success!&quot;<br><br>Eva-Lisa Heinrichs" } ;
		
	if (linktext>"")
	{getRef("div1").innerHTML=linktext;}
//	document.getElementById("div1").innerHTML=linktext;}
		
//	NewWindow('/popmessage.asp','popmsg','500','450','yes','center');
}


function getPageName()
{
var sPath = window.location.pathname;
	//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
	return sPage;
}


function findPosX(obj)
{
	var curleft = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curtop += obj.y;
	return curtop;
}

function setsource(obj1, newsource)
{	

	var obj = document.getElementById(obj1);
	obj.src = newsource;
}

function NewWindow(mypage,myname,w,h,scroll,pos)
		{
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
		settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
		window.open(mypage,myname,settings);}




function checkEmail(text) 
{
  if (text.indexOf("@")<3){
    alert(" This email address seems wrong. Please"
    +" check the prefix and '@' sign.");
    return false;
  }
  if ((text.indexOf(".co")<4)&&(text.indexOf(".org")<5)
    &&(text.indexOf(".gov")<5)&&(text.indexOf(".net")<5)
    &&(text.indexOf(".ac")<4)&&(text.indexOf(".nl")<4)
    &&(text.indexOf(".mil")<5)&&(text.indexOf(".edu")<5))
  {
     alert(" This email address seems wrong. Please check the suffix.");
     return false;
  }
return true;
}

//Link Description script
//change link descriptions as needed
function show_text(thetext, whichdiv){

var linktext=new Array()
//hOME
linktext[0]="Welcome to Picasso Caterers";
//Wedings
linktext[1]="<center><br><br>When organising your wedding allow Picasso Caterers to take care of your catering requirements. <br><br><br></center>";
//Business
linktext[2]="<center><br><br>Our corporate catering menus are designed to meet the special needs of offices and meeting facilities<br><br><br></center>";
//Private
linktext[3]="<br>Let our professional catering staff handle every detail of your next birthday party, anniversary, family reunion or other special event<br><br><br>";
//Menus
linktext[4]="&quot;If you have a particular menu or theme in mind, i can be inventive!&quot;<br><br> Picasso Head Chef";
//Contact
linktext[5]="<br><br>We would love to talk with you about how Picasso Caterers can help you with your upcoming event.<br><br><br>";
//alert(linktext[thetext]);
document.getElementById(whichdiv).innerHTML=linktext[thetext]
}

function resetit(whichdiv){
document.getElementById(whichdiv).innerHTML='<center><br><br>Welcome to Picasso Caterers<br><br><br><br></center>'
}
<!-- show_text(index# of linktext[] to show, ID of div to write to) -->

window.onload=init

