// JavaScript Document
function SDMenu(id) {
	
	if (!document.getElementById || !document.getElementsByTagName)
		return false;
	this.menu = document.getElementById(id);
	this.submenus = this.menu.getElementsByTagName("div");
	this.remember = true;
	this.speed = 3;
	this.markCurrent = true;
	this.oneSmOnly = false;
}
SDMenu.prototype.init = function() {
	var mainInstance = this;
	for (var i = 0; i < this.submenus.length; i++)
		
		this.submenus[i].getElementsByTagName("span")[0].onclick = function() {
			mainInstance.toggleMenu(this.parentNode);
			//this.menu.getElementsByTagName("a");
			
			
		};
	if (this.markCurrent) {
		var links = this.menu.getElementsByTagName("a");
		for (var i = 0; i < links.length; i++)
			if (links[i].href == document.location.href) {
				links[i].className = "current";
				break;
			}
	}
	if (this.remember) {
		var regex = new RegExp("sdmenu_" + encodeURIComponent(this.menu.id) + "=([01]+)");
		var match = regex.exec(document.cookie);
		if (match) {
			var states = match[1].split("");
			for (var i = 0; i < states.length; i++)
				this.submenus[i].className = (states[i] == 0 ? "collapsed" : "");
		}
		
	}
	
};
SDMenu.prototype.toggleMenu = function(submenu) {
	if (submenu.className == "collapsed")
		this.expandMenu(submenu);
	else
		this.collapseMenu(submenu);
};
SDMenu.prototype.expandMenu = function(submenu) {
	var fullHeight = submenu.getElementsByTagName("span")[0].offsetHeight;
	var links = submenu.getElementsByTagName("a");
	for (var i = 0; i < links.length; i++)
		fullHeight += links[i].offsetHeight;
	var moveBy = Math.round(this.speed * links.length);
	
	var mainInstance = this;
	var intId = setInterval(function() {
		var curHeight = submenu.offsetHeight;
		var newHeight = curHeight + moveBy;
		if (newHeight < fullHeight)
			submenu.style.height = newHeight + "px";
		else {
			clearInterval(intId);
			submenu.style.height = "";
			submenu.className = "";
			mainInstance.memorize();
		}
	}, 30);
	this.collapseOthers(submenu);
};
SDMenu.prototype.collapseMenu = function(submenu) {
	var minHeight = submenu.getElementsByTagName("span")[0].offsetHeight;
	var moveBy = Math.round(this.speed * submenu.getElementsByTagName("a").length);
	var mainInstance = this;
	var intId = setInterval(function() {
		var curHeight = submenu.offsetHeight;
		var newHeight = curHeight - moveBy;
		if (newHeight > minHeight)
			submenu.style.height = newHeight + "px";
		else {
			clearInterval(intId);
			submenu.style.height = "";
			submenu.className = "collapsed";
			mainInstance.memorize();
		}
	}, 30);
};
SDMenu.prototype.collapseOthers = function(submenu) {
	if (this.oneSmOnly) {
		for (var i = 0; i < this.submenus.length; i++)
			if (this.submenus[i] != submenu && this.submenus[i].className != "collapsed")
				this.collapseMenu(this.submenus[i]);
	}
};
SDMenu.prototype.expandAll = function() {
	var oldOneSmOnly = this.oneSmOnly;
	this.oneSmOnly = false;
	for (var i = 0; i < this.submenus.length; i++)
		if (this.submenus[i].className == "collapsed")
			this.expandMenu(this.submenus[i]);
	this.oneSmOnly = oldOneSmOnly;
};
SDMenu.prototype.collapseAll = function() {
	for (var i = 0; i < this.submenus.length; i++)
		if (this.submenus[i].className != "collapsed")
			this.collapseMenu(this.submenus[i]);
};
SDMenu.prototype.memorize = function() {
	if (this.remember) {
		var states = new Array();
		for (var i = 0; i < this.submenus.length; i++)
			states.push(this.submenus[i].className == "collapsed" ? 0 : 1);
		var d = new Date();
		d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000));
		/*alert(encodeURIComponent(this.menu.id));
		alert(states.join(""));
		alert(d.toGMTString());*/
		document.cookie = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/";
		//alert(document.cookie);
		window.location=this.path;
	}
};

function fnPopWindow(val)
{
	win=dhtmlmodal.open('winbox', 'iframe', val ,'Contact Us','width=800px,height=510px,resize=1,scrolling=1,center=1'); 
	return false	
}
/*function test()
{
	window.open('http:\\localhost\placement\default.asp','mywindow','width=500,height=500');
	}*/
	
//var path = "http://devsrv/finalwebsiteupload/amity_edu/ais/aisib/";
var path = "http://www.amityglobalschool.com/";
var myMenu1,myMenu2,myMenu3,myMenu4,myMenu5;
	window.onload = function() {
		
		myMenu1 = new SDMenu("my_menu1");
		myMenu1.speed = 2;                     // Menu sliding speed (1 - 5 recomended)
		myMenu1.remember = true;               // Store menu states (expanded or collapsed) in cookie and restore later
		myMenu1.oneSmOnly = false;             // One expanded submenu at a time
		myMenu1.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu1.path = path+"theamitygroup.htm";
		myMenu1.init();
		
	/*	myMenu2 = new SDMenu("my_menu2");
		myMenu2.speed = 2;                     // Menu sliding speed (1 - 5 recomended)
		myMenu2.remember = true;               // Store menu states (expanded or collapsed) in cookie and restore later
		myMenu2.oneSmOnly = false;             // One expanded submenu at a time
		myMenu2.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu2.path = path+"messages/director_msg.html";
		myMenu2.init();
		
		myMenu3 = new SDMenu("my_menu3");
		myMenu3.speed = 2;                     // Menu sliding speed (1 - 5 recomended)
		myMenu3.remember = true;               // Store menu states (expanded or collapsed) in cookie and restore later
		myMenu3.oneSmOnly = false;             // One expanded submenu at a time
		myMenu3.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu3.path = path+"messages/director_msg.html";
		myMenu3.init();
	*/	
		myMenu4 = new SDMenu("my_menu2");
		myMenu4.speed = 2;                     // Menu sliding speed (1 - 5 recomended)
		myMenu4.remember = true;               // Store menu states (expanded or collapsed) in cookie and restore later
		myMenu4.oneSmOnly = false;             // One expanded submenu at a time
		myMenu4.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu4.path = path+"theibo.htm";
		myMenu4.init();
		
		myMenu5 = new SDMenu("my_menu3");
		myMenu5.speed = 2;                     // Menu sliding speed (1 - 5 recomended)
		myMenu5.remember = true;               // Store menu states (expanded or collapsed) in cookie and restore later
		myMenu5.oneSmOnly = false;             // One expanded submenu at a time
		myMenu5.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu5.path = path+"theprogram.htm";
		myMenu5.init();
	/*	
		myMenu6 = new SDMenu("my_menu4");
		myMenu6.speed = 2;                     // Menu sliding speed (1 - 5 recomended)
		myMenu6.remember = true;               // Store menu states (expanded or collapsed) in cookie and restore later
		myMenu6.oneSmOnly = false;             // One expanded submenu at a time
		myMenu6.markCurrent = true;            // Mark current link / page (link.href == location.href)
		myMenu6.path ="#";
		myMenu6.init();
		*/

		
	};






document.write('<table cellspacing="0" cellpadding="0" width="205px" bgcolor="#C6E5F8">');
document.write('<tr>');
document.write('<td background="image/b5.png" height="25px" class="styleF1" width="100%"><a href="default.htm">Home</a></td>');
document.write('</tr>');

document.write('<table cellspacing="0" cellpadding="0" width="205px" bgcolor="#C6E5F8">');
document.write('<tr>');
document.write('<td background="image/b5.png" height="25px" class="styleF1" width="100%"><a href="aboutus.htm">About Us</a></td>');
document.write('</tr>');

document.write('<tr><td width="100%">');
document.write('<div style="float: left" id="my_menu1" class="sdmenu">');
document.write('<div>');
document.write('<span>THE AMITY GROUP</span>');
//document.write('<a href='+path+'>Home</a>');
document.write('<a href='+path+'ais.htm>Amity International school</a>');
document.write('<a href='+path+'mission.htm>Mission Statement</a>');
document.write('<a href='+path+'philosophy.htm>Our Philosophy</a>');
document.write('</div>');
document.write('</div>');
document.write('</td></tr>');

//document.write('<tr>');
//document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href="http://amityuniversity.ac.in/" target="_blank">Amity University</a></td>');
//document.write('</tr>');


/*document.write('<tr><td width="100%">');
document.write('<div style="float: left" id="my_menu2" class="sdmenu">');
document.write('<div>');
document.write('<span>Messages</span>');*/
//document.write('<a href='+path+'messages/director_msg.html>Director (ATPC)</a>');
//document.write('<a href='+path+'coming_up.html>Founder President</a>');
/*document.write('<a href='+path+'default.asp>President</a>');*/
//document.write('<a href='+path+'coming_up.html>Vice Chancellor</a>');
//document.write('</div>');
/*document.write('<div>');
document.write('<span>Support Us</span>');
document.write('<a href="http://www.dynamicdrive.com/recommendit/">Recommend Us</a>');
document.write('<a href="http://www.dynamicdrive.com/link.htm">Link to Us</a>');
document.write('<a href="http://www.dynamicdrive.com/resources/">Web Resources</a>');
document.write('</div>');
document.write('<div class="collapsed">');
document.write('<span>Partners</span>');
document.write('<a href="http://www.javascriptkit.com">JavaScript Kit</a>');
document.write('<a href="http://www.cssdrive.com">CSS Drive</a>');
document.write('<a href="http://www.codingforums.com">CodingForums</a>');
document.write('<a href="http://www.dynamicdrive.com/style/">CSS Examples</a>');
document.write('</div>');
document.write('<div>');
document.write('<span>Test Current</span>');
document.write('<a href="index.html">Current or not</a>');
document.write('<a href="index.html">Current or not</a>');
document.write('<a href="index.html">Current or not</a>');
document.write('<a href="index.html?query">Current or not</a>');
document.write('</div>');*/
//document.write('</div>');
//document.write('</td></tr>');
/*
document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'governing_body.html>Governing Body</a></td>');
document.write('</tr>');

document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'recruit.html>Why Recruit @ Amity</a></td>');
document.write('</tr>');
*/

document.write('<tr><td width="100%">');
document.write('<div style="float: left" id="my_menu2" class="sdmenu">');
document.write('<div>');
document.write('<span>THE IBO</span>');
//document.write('<a href='+path+'messages/director_msg.html>Message of Director(ATPC)</a>');
document.write('<a href='+path+'ibomission.htm>Mission</a>');
document.write('<a href='+path+'iblearner.htm>IB Learner Profile</a>');
document.write('</div>');
document.write('</div>');
document.write('</td></tr>');
/*
document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'faculty.html>Faculty</a></td>');
document.write('</tr>');


document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'courses.html>Courses Offered</a></td>');
document.write('</tr>');
*/
document.write('<tr><td width="100%">');
document.write('<div style="float: left" id="my_menu3" class="sdmenu">');
document.write('<div>');
document.write('<span>THE PROGRAM</span>');
//document.write('<a href='+path+'place_process/process.html>Placement Process</a>');
document.write('<a href='+path+'thecurriculum.htm>The Curriculum</a>');
//document.write('<a href='+path+'ibosubject.htm>Subject Choice</a>');
//document.write('<a href='+path+'place_process/brochure.html>Download Brochure</a>');
//document.write('<a href=mailto:ajay_rana@amity.edu;placement@amity.edu>Enroll your Company</a>');
document.write('</div>');
document.write('</div>');
document.write('</td></tr>');
/*
document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'record.html>Placement Record</a></td>');
document.write('</tr>');

document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'past_recruit.html>Past Recruiters</a></td>');
document.write('</tr>');

document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'student_profile.html>Students Profile</a></td>');
document.write('</tr>');


document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href='+path+'campus_life.html>Campus Life</a></td>');
document.write('</tr>');


document.write('<tr>');
document.write('<td background='+path+'image/b2.jpg height="25px" class="styleF1" width="100%"><a href=http://www.amity.edu/alumni target="_blank">Alumni Council</a></td>');
document.write('</tr>');
*/

document.write('<tr>');
document.write('<td background='+path+'image/b5.png height="25px" class="styleF1" width="100%"><a href='+path+'recognition.htm>RECOGNITION</a></td>');
document.write('</tr>');


//-document.write('<tr><td width="100%">');
//-document.write('<div style="float: left" id="my_menu4" class="sdmenu">');
//-document.write('<div>');
//-document.write('<span>Fees</span>');
//document.write('<a href='+path+'Prospectus2008.pdf target=_blank>Download Prospectus</a>');
//document.write('<a href='+path+'Studentapplicationform.pdf target=_blank>Download Form</a>');
//-document.write('<a href='+path+'pdf/IBDP_FEES(2009-2011).pdf target=_blank>Fee Structure for IBDP</a>');
//-document.write('<a href='+path+'pdf/CIE_FEES(2009-2011).pdf target=_blank>Fee Structure for CIE</a>');
//document.write('<a href='+path+'ibosubject.htm>Subject Choice</a>');
//document.write('<a href=# OnClick=javascript:fnPopWindow("'+path+'form.pdf");>Download Form</a>');
//document.write('<a href=# OnClick=javascript:fnPopWindow("'+path+'ibosubject.htm");>Subject Choice</a>');
//-document.write('</div>');
//-document.write('</div>');
//-document.write('</td></tr>');

/*
document.write('<tr><td width="100%">');
document.write('<div style="float: left" id="my_menu6" class="sdmenu">');
document.write('<div>');
document.write('<span>Corporate Laisoning</span>');
document.write('<a href='+path+'sun.html>Sun Microsystems</a>');
document.write('<a href=http://www.campusconnect.infosys.com target=_blank>Infosys</a>');
document.write('<a href=http://www.sife.org target=_blank>Syntel</a>');
document.write('</div>');
document.write('</div>');
document.write('</td></tr>');


document.write('<tr>');
document.write('<td background='+path+'image/b5.png height="25px" class="styleF1" width="100%"><a href='+path+'ibocareers.htm>CAREERS</a></td>');
document.write('</tr>');
*/
document.write('<tr>');
document.write('<td background='+path+'image/b5.png height="25px" class="styleF1" width="100%"><a href='+path+'contact_us.htm>CONTACT US</a></td>');
document.write('</tr>');

document.write('<tr>');
document.write('<td background='+path+'image/b5.png height="25px" class="styleF1" width="100%"><a href='+path+'faq.htm>FAQs</a></td>');
document.write('</tr>');


document.write('</table>');
