﻿function NavigatePage(page)
{
    if (page == 1)
    {
        document.location.href = "index.html";
    }
    else if (page == 2)
    {
        document.location.href = "Contact_details.html";
    }
    else if (page == 3)
    {
        document.location.href = "About_PISA.html";
    }
    else if (page == 4)
    {
        document.location.href = "Aims_and_Objectives.html";
    }
    else if (page == 5)
    {
        document.location.href = "Enviromark.html";
    }
    else if (page == 6)
    {
        document.location.href = "Official_Journal.html";
    }
    else if (page == 7)
    {
        document.location.href = "Bursaries.html";
    }
    else if (page == 8)
    {
        document.location.href = "A_Career_in_plastics.html";
    }
    else if (page == 9)
    {
        document.location.href = "Subscriptions_and_fees.html";
    }
    else if (page == 10)
    {
        document.location.href = "Grades_of_Membership.html";
    }
    else if (page == 11)
    {
        document.location.href = "Administration_of_PISA.html";
    }
    else if (page == 12)
    {
        document.location.href = "Duties_of_Branch_REP.html";
    }
    else if (page == 13)
    {
        document.location.href = "Appointments.html";
    }
    else if (page == 14)
    {
        document.location.href = "Sponsorship_of_Lectures.html";
    }
    else if (page == 15)
    {
        document.location.href = "Best_Paper_Award.html";
    }
    else if (page == 16)
    {
        document.location.href = "Publication.html";
    }
    else if (page == 17)
    {
        document.location.href = "Speaker_Protocol.html";
    }
}

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/


var menu1=new Array()
menu1[0]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(1)'><b>Home</b></td></tr></table></a>"
menu1[1]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(2)'><b>Contact details</b></td></tr></table></a>"

var menu2=new Array()
menu2[0]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(3)'><b>About PISA</b></td></tr></table></a>"
menu2[1]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(4)'><b>Aims and Objectives</b></td></tr></table></a>"
menu2[2]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(5)'><b>Enviromark</b></td></tr></table></a>"
menu2[3]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(6)'><b>Official Journal</b></td></tr></table></a>"
menu2[4]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(7)'><b>Bursaries</b></td></tr></table></a>"
menu2[5]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(8)'><b>A Career in plastics</b></td></tr></table></a>"

var menu3=new Array()
menu3[0]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(9)'><b>Subscriptions and fees</b></td></tr></table></a>"
menu3[1]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(10)'><b>Grades of Membership</b></td></tr></table></a>"

var menu4=new Array()
menu4[0]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(11)'><b>Administration of PISA</b></td></tr></table></a>"
menu4[1]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(12)'><b>Duties of Branch REP</b></td></tr></table></a>"
menu4[2]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(13)'><b>Appointments</b></td></tr></table></a>"

var menu6=new Array()
menu6[0]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(14)'><b>Sponsorship of Lectures</b></td></tr></table></a>"
menu6[1]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(15)'><b>Best Paper Award</b></td></tr></table></a>"
menu6[2]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(16)'><b>Publication</b></td></tr></table></a>"
menu6[3]="<a><table height='20' width='139' border='1' style='background-color: rgb(109,207,246); border-color: rgb(109,207,246); border-style: solid'><tr><td style='border-style: none; margin: 0; padding: 0; font-size: 12px; text-align: center; font-family: Arial; color: White; cursor: pointer' onclick='NavigatePage(17)'><b>Speaker Protocol</b></td></tr></table></a>"


var menuwidth='165px' //default menu width
var menubgcolor=0  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


var interval = 5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;
var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("images/IMAGE_ONE.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_TWO.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_THREE.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_FOUR.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_FIVE.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_SIX.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_SEVEN.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_EIGHT.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_NINE.jpg");
image_list[image_index++] = new imageItem("images/IMAGE_TEN.jpg");

var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}
