/*
	This is the global js file contains all the information about banner,menu and the   contents are copyrighted by alliance infocom www.allianceinfocom.net
*/

/*-------Following class declared menu items--------------*/

function Menu(name,title,url){
	this.name=name;
	this.title=title;
	this.url=url;
}

/*------------Creating Top Menu array----------------------*/
var gTopMenu=new Array();
gTopMenu[gTopMenu.length]=new Menu("tm1","HOME","index.html");
gTopMenu[gTopMenu.length]=new Menu("tm2","ABOUT US","about.html");
gTopMenu[gTopMenu.length]=new Menu("tm5","UPCOMING EVENTS","upcoming_events2007.html");
gTopMenu[gTopMenu.length]=new Menu("tm5","CAREERS","careers.html");
gTopMenu[gTopMenu.length]=new Menu("tm5","TENDERS","tenders.html");
gTopMenu[gTopMenu.length]=new Menu("tm5","CONTACT US","mailto:vitm@vsnl.com");
gTopMenu[gTopMenu.length]=new Menu("tm6","FEEDBACK","feedback.html");

/*-----------Creating Left Menu array----------------------*/
var gLeftMenu=new Array();
gLeftMenu[gLeftMenu.length]=new Menu("lm2","EXHIBITION HALLS","eh.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm3","ACTIVITIES","act.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm5","MEMBERSHIP","mem.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm6","SPONSORSHIP","spon.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm7","WHATS NEW","whats new.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm7","SATELLITE UNITS","units.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm10","CONVENTION CENTRE","convention.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm10","ARTEFACTS","arch.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm10","LINKS","links.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm10","RIGHT OF INFORMATION","right_info.html");
gLeftMenu[gLeftMenu.length]=new Menu("lm10","SITE MAP","sitemap.html");


/*-----------Function to add banner----------------------*/

function addBanner(){
	var str='<table border="0" width="100%" height="20px">';
	str+='<tr>';
	str+='<td class="topmenu">'
	var str='|&nbsp;';
	var url=location.href;
	for(var i=0;i<gTopMenu.length;i++){
		var regex=new RegExp(gTopMenu[i].url,"i");
		if(regex.test(url)){
			str+='<font color=#FF0000>'+gTopMenu[i].title+'</font>&nbsp;|&nbsp;';
		}else{
			str+='<a href="'+gTopMenu[i].url+'">'+gTopMenu[i].title+'</a>&nbsp;|&nbsp;';
		}
	}
	
	str+='</td>';
	str+='</tr>';
	str+='</table>';
	document.getElementById("idBanner").height="20px";
	document.getElementById("idBanner").innerHTML=str;
}

/*-------------Function to Add Left Menu---------------------*/
function addMenu(){
	var str='<table border="0" cellpadding="0" cellspacing="8" width="100%">';
	var url=location.href;
	for(var i=0;i<gLeftMenu.length;i++){
		str+='<tr><td class="leftmenu" align="left"><br><img src="images/arrow.jpg">';
		var regex=new RegExp(gLeftMenu[i].url,"i");
		if(regex.test(url)){
			str+='<font color="#ff0000">'+gLeftMenu[i].title+'</font>';
		}else{
			str+='<a href="'+gLeftMenu[i].url+'">'+gLeftMenu[i].title+'</a>';
		}
		str+='</td></tr>';
	}
	str+='</table>';
	document.getElementById("idLeftMenu").bgColor='#000033'
	document.getElementById("idLeftMenu").width='21%'
	document.getElementById("idLeftMenu").innerHTML=str;
}

function addFotter(){
	idFoot=document.getElementById("idFotter")
	idFoot.bgColor='#000033';
		var str='<div align="center">'
		str+='<font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">' 
        str+='Visvesvaraya Industrial & Technological Museum,Kasturba Road,Bangalore-560001,INDIA.<br>'		
		str+='<font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">' 
        str+='&copy;2004  Visvesaraya Industrial & Technological Museum. All rights reserved.<br><br>'
        str+='</font></div>'
		idFoot.innerHTML=str
}