var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
var animStepTime=0;
var animStepSize=new Array;
var iArray=new Array;
var shrinking=new Array
for (count=0;count<500;++count){
	shrinking[count]=false;
	iArray[count]=64;
	animStepSize[count]=1;
	}


function show(id){
// Netscape 4
if(ns4){
//document.layers[id].visibility = "show";
}
// Explorer 4
else if(ie4){
document.all[id].style.visibility = "visible";
}
// W3C - Explorer 5+ and Netscape 6+
else if(ie5 || ns6){
document.getElementById(id).style.visibility = "visible";
}
else {return false;}
}

function calcStepSize(i){
	return (32-(Math.abs(i-96)))/1.5;
}

function mouseOverExpand(image,imagePos){
	if ((iArray[imagePos]<128)&&(shrinking[imagePos]==false)) {
		iArray[imagePos]+=animStepSize[imagePos];
		if (iArray[imagePos]>128) iArray[imagePos]=128;
		animStepSize[imagePos]=calcStepSize(iArray[imagePos]);
		if (animStepSize[imagePos]<1) animStepSize[imagePos]=1
		document.getElementById(image).width=iArray[imagePos];
		document.getElementById(image).height=iArray[imagePos];
		eval("setTimeout(\"mouseOverExpand('"+image+"',"+imagePos+")\",animStepTime)");
	}
}

function mouseOutContract(image,imagePos){
	shrinking[imagePos]=true;
	if (iArray[imagePos]>64) {
		iArray[imagePos]-=animStepSize[imagePos];
		if (iArray[imagePos]<64) iArray[imagePos]=64;
		animStepSize[imagePos]=calcStepSize(iArray[imagePos]);
		if (animStepSize[imagePos]<1) animStepSize[imagePos]=1
		document.getElementById(image).width=iArray[imagePos];
		document.getElementById(image).height=iArray[imagePos];
		eval("setTimeout(\"mouseOutContract('"+image+"',"+imagePos+")\",animStepTime)");
		
	}
	else shrinking[imagePos]=false;
}

function hide(id){
// Netscape 4
if(ns4){
document.layers[id].visibility = "hide";
}
// Explorer 4
else if(ie4){
document.all[id].style.visibility = "hidden";
}
// W3C - Explorer 5+ and Netscape 6+
else if(ie5 || ns6){
document.getElementById(id).style.visibility = "hidden";
}
else {return false;}
}

function openMenu(menuNo){
	for (i=1;i<menuSet.length;++i){
		i==menuNo?show(i):hide(i);
	}
}

function closeAll(){
	openMenu(menuSet.length);
}

//WRITING THE MENU AND PAGE

var page="</head><body text='#000000' bgcolor='#FFFFFF' link='#666600' vlink='#666600' alink='#666600' onClick='closeAll();'>";

menuSet = new Array();
menuSet[1] = new Array("exhibitions","exhibitions.htm","biodegradables","biodegradable.htm","students","students.htm");
menuSet[2] = new Array("about us", "about.htm","contact & ordering", "contact.htm","in the pacific rim","pacific.htm","samples","samples.htm","printable info","print.htm","price-list","pricelist.htm","more Smiles","smile_holland.htm");
menuSet[3] = new Array("mobiles","mobiles.htm","wellies","wellies.htm","bottle range","bottle.htm","hard and rigids","hips.htm","jazz","hmw.htm","snowflake","sf.htm","dapple","dapple.htm","CD","cd.htm","banknote","ben.htm","specials","special.htm","how we make it","production.htm","how to cut and use","cutting.htm","HASAW info","hasaw.htm","price-list","pricelist.htm");
menuSet[4] = new Array("images","DesPhotoStatic.htm");
menuSet[5] = new Array("frequently asked questions","faq.htm");

for (i=1;i<menuSet.length;++i) {
	page+=("<div class=menu"+i+" ID="+i+">");
	for(j=0;j<menuSet[i].length;j=j+2){
		page+=("<div class=menuitem><a href='"+menuSet[i][j+1]+"' class='menu' onMouseOver='window.status=\""+menuSet[i][j]+"\"; return true'>&nbsp;"+menuSet[i][j]+"</a></div>");
		//page+=("<div class=menuitem><a href='"+menuSet[i][j+1]+"' class='menu' onMouseOver='window.status=\""+menuSet[i][j]+"\"; return true'>"+menuSet[i][j]+"</a></div>");
	}
	page+=("</div>");
}

page+="<div class=menubar ID=5><img name='navbar' src='menu.gif' border='0' usemap='#navbarmap'>"
page+="<map name='navbarmap'>"
	page+="<area onMouseOver='openMenu(1); window.status=\"News\"; return true' shape='rect' coords='0, 89, 169, 126'>"
	page+="<area onMouseOver='openMenu(2); window.status=\"About Smile Plastics\"; return true' shape='rect' coords='0, 127, 169, 153'>"
	page+="<area onMouseOver='openMenu(3); window.status=\"Smile Plastics Products\"; return true' shape='rect' coords='0, 154, 165, 185'>"
	page+="<area onMouseOver='openMenu(4); window.status=\"Examples of Products in use\"; return true' shape='rect' coords='0, 186, 165, 221'>"
	page+="<area onMouseOver='openMenu(5); window.status=\"Frequently Asked Questions\"; return true' shape='rect' coords='0, 222, 165, 252'>"
page+="</map></div>"
page+="<div class=main ID=10><table width='100%' border='1' bordercolor='#666600' cellspacing='0' cellpadding='5' bordercolor='#666600' bordercolorlight='#666600' bordercolordark='#666600'><tr><td bgcolor='#EEEFBD'>"


document.write(page)