/* base javascript file */


var dropdownAR = new Array();
dropdownAR[0] = new Array('Bookings','bookings.php','cu');
dropdownAR[1] = new Array('Enquiries','enquiry.php','cu');
dropdownAR[2] = new Array('Location','map.php','cu');
dropdownAR[3] = new Array('Conferences','conferences.php','e');
dropdownAR[4] = new Array('Functions','functions.php','e');
dropdownAR[5] = new Array('Fundrasing',' fundrasing.php','e');
dropdownAR[6] = new Array('Birthday Parties','parties.php','e');
dropdownAR[7] = new Array('Bowling','bowling.php','bow');
dropdownAR[8] = new Array('Bowling options','bowling_options.php','bow');



var last_dp_id = '';
function changeRow(id) {

if ( last_dp_id != '' ) {
	document.getElementById(last_dp_id).style.background = '#096b80';
}
	document.getElementById(id).style.background     = '#1cb2d2';
	last_dp_id = id;



}

function hideDiv() {
	document.getElementById('contact_us_div').style.visibility = 'hidden';
}

function dropdown (id, left) {
last_dp_id='';
var div = document.getElementById('contact_us_div');

var table_str = "<table class=\"dropdown\">";

for ( var index = 0; index < dropdownAR.length; index++) {
	if ( dropdownAR[index][2] == id ) {
		 table_str = table_str + "<tr><td id=" + index + " ><a class=\"nav\"";
		 table_str = table_str + "onmouseover=\"changeRow('"+ index + "')\"";
		 table_str = table_str + " href=\"" + dropdownAR[index][1] + "\">" + dropdownAR[index][0] + "</a><td></tr>";
		
	}
}
table_str = table_str + "</table>";
div.innerHTML=table_str;

div.style.left=left;
div.style.top=168;

div.style.visibility='visible';


}

function contactus () {

var div = document.getElementById('contact_us_div');

var array = new Array();
array[0] = new Array('Bookings', 'bookings.php');
array[1] = new Array('Enquiries', 'enquiry.php');
array[2] = new Array('Location', 'map.php');

var table_str = "<table class=\"dropdown\">";

for (var index =0; index < array.length; index++) {
	table_str = table_str + "<tr><td id=" + index + " ><a class=\"nav\" onmouseover=\"changeRow('"+ index + "')\" href=\"" + array[index][1] + "\">" + array[index][0] + "</a><td></tr>";
}
table_str = table_str + "</table>";
div.innerHTML=table_str;

div.style.left=715;
div.style.top=167;

div.style.visibility='visible';


}



var last_id = "blank";

var cur_id;

var myinterval;

var main_div= 'visibile';


/*
function resize_L(){

var w = document.getElementById(cur_id).childNodes[0].getAttribute('width');

	if (parseInt(w) > 200){

		document.writeln("www");

		window.		1`	(myinterval);

	}

	else{

		document.getElementById(cur_id).childNodes[0].setAttribute('width', parseInt(w + 10));

	}

//return true;

}



function resize_S(){

var w = document.getElementById(last_id).childNodes[0].getAttribute('width');

	if (w < 290){

		window.clearInterval(myinterval);

	}

	else{

		document.getElementById(last_id).childNodes[0].setAttribute('width', parseInt(w - 10));

	}

return true;



}



function resize_small(){

	myinterval = window.setInterval('resize_S()',10);



}





*/

function enlarge(id){

	cur_id = id;

	if(document.getElementById('main_div').style.visibility=='hidden'){

     		//alert("yes_2" + last_id);
		document.getElementById('main_div').style.visibility='visible';
		document.getElementById(last_id).style.visibility='hidden';

	}
	else{
	document.getElementById('main_div').style.visibility='hidden';
	var cur_div = document.getElementById(id);
	cur_div.style.visibility='visible';

	}


	last_id = cur_id;

}









