﻿// JScript File
var scrollTim=1;
var current
id=window.location.href; re=/\w+\.aspx/i; rf=/\w+/i
id=re.exec(id); id=rf.exec(id)+"";

menuArr = new Array()
menuArr[1] = new Array()
menuArr[1][0] = "GGlibrary/images/master/tab/Destination.JPG"

menuArr[1][1] = new Array()
menuArr[1][1][0] = "Gap Year Abroad"
menuArr[1][1][1] = "India"
menuArr[1][1][2] = 'Destination/India'
menuArr[1][2] = new Array()
menuArr[1][2][1] = 'Nepal'
menuArr[1][2][2] = 'Destination/Nepal'
menuArr[1][3] = new Array()
menuArr[1][3][1] = 'Tanzania'
menuArr[1][3][2] = 'Destination/Tanzania'
menuArr[1][4] = new Array()
menuArr[1][4][1] = 'Ecuador'
menuArr[1][4][2] = 'Destination/Ecuador'
menuArr[1][5] = new Array()
menuArr[1][5][1] = 'Chile'
menuArr[1][5][2] = 'Destination/Chile'
menuArr[1][6] = new Array()
menuArr[1][6][1] = 'Sri Lanka'
menuArr[1][6][2] = 'Destination/Sri-Lanka'
menuArr[1][7] = new Array()
menuArr[1][7][1] = 'Romania'
menuArr[1][7][2] = 'Destination/Romania'
menuArr[1][8] = new Array()
menuArr[1][8][1] = 'South Africa'
menuArr[1][8][2] = 'Destination/South-Africa'
menuArr[1][9] = new Array()
menuArr[1][9][1] = 'China'
menuArr[1][9][2] = 'Destination/Gap-Year-China'
menuArr[1][10] = new Array()
menuArr[1][10][1] = 'Cambodia'
menuArr[1][10][2] = 'Destination/Gap-Year-Cambodia'
menuArr[1][11] = new Array()
menuArr[1][11][1] = 'Thailand'
menuArr[1][11][2] = 'Destination/Gap-Year-Thailand'
menuArr[1][12] = new Array()
menuArr[1][12][1] = 'Philippines'
menuArr[1][12][2] = 'Destination/Gap-Year-Philippines'

menuArr[2] = new Array()
menuArr[2][0] = "GGlibrary/images/master/tab/Work.JPG"
menuArr[2][1] = new Array()
menuArr[2][1][0] = "Internships Abroad"
menuArr[2][1][1] = "Business Internships"
menuArr[2][1][2] = "gap-year-internships/Business-Internships"
menuArr[2][2] = new Array()
menuArr[2][2][1] = "Medical Internships"
menuArr[2][2][2] = "gap-year-internships/Medical-Internships"
menuArr[2][3] = new Array()
menuArr[2][3][1] = "Journalism Internships"
menuArr[2][3][2] = "gap-year-internships/Journalism-Internships"


menuArr[3] = new Array()
menuArr[3][0] = "GGlibrary/images/master/tab/Volunteer.JPG"
menuArr[3][1] = new Array()
menuArr[3][1][0] = "Volunteer Abroad"
menuArr[3][1][1] = "Childcare"
menuArr[3][1][2] = "gap-year-volunteering/Childcare"
menuArr[3][2] = new Array()
menuArr[3][2][1] = "Sports Coaching"
menuArr[3][2][2] = 'gap-year-volunteering/Sports-Coaching'
menuArr[3][3] = new Array()
menuArr[3][3][1] = 'Community Developement'
menuArr[3][3][2] = 'gap-year-volunteering/Community-Development'
menuArr[3][4] = new Array()
menuArr[3][4][1] = "Conservation"
menuArr[3][4][2] = "gap-year-volunteering/Conservation"
menuArr[3][5] = new Array()
menuArr[3][5][1] = "Arts, Crafts And Music"
menuArr[3][5][2] = "gap-year-volunteering/arts-crafts-and-music"


menuArr[4] = new Array()
menuArr[4][0] = "GGlibrary/images/master/tab/Teach.JPG"
menuArr[4][1] = new Array()
menuArr[4][1][0] = "Volunteer Teaching"
menuArr[4][1][1] = "Primary Schools"
menuArr[4][1][2] = 'gap-year-teaching/Primary-Schools'

menuArr[4][2] = new Array()
menuArr[4][2][1] = "Secondary Schools"
menuArr[4][2][2] = 'gap-year-teaching/Secondary-Schools'

menuArr[4][3] = new Array()
menuArr[4][3][1] = "Community Schools"
menuArr[4][3][2] = 'gap-year-teaching/Community-Schools'

menuArr[4][4] = new Array()
menuArr[4][4][1] = "Extra-Curricular"
menuArr[4][4][2] = 'gap-year-teaching/Extra-Curricular'

menuArr[4][5] = new Array()
menuArr[4][5][1] = "Special Needs"
menuArr[4][5][2] = 'gap-year-teaching/Special-Needs'

menuArr[5] = new Array()
menuArr[5][0] = "GGlibrary/images/master/tab/Travel.JPG"

menuArr[5][1] = new Array()
menuArr[5][1][0] = "Adventure Travel"
menuArr[5][1][1] = "Adventure"
menuArr[5][1][2] = 'gap-year-travel/adventure'
menuArr[5][2] = new Array()
menuArr[5][2][1] = "Culture"
menuArr[5][2][2] = 'gap-year-travel/culture'
menuArr[5][3] = new Array()
menuArr[5][3][1] = "Leisure"
menuArr[5][3][2] = 'gap-year-travel/leisure'
menuArr[5][4] = new Array()
menuArr[5][4][1] = "Wildlife"
menuArr[5][4][2] = 'gap-year-travel/wildlife'

menuArr[6] = new Array()
menuArr[6][0] = "GGlibrary/images/master/tab/Travel.JPG"
menuArr[6][1] = new Array()
menuArr[6][1][1] = "About GapGuru"
menuArr[6][1][2] = "About-Us/"
menuArr[6][2] = new Array()
menuArr[6][2][1] = "Why Vounteer Abroad"
menuArr[6][2][2] = "GapYearAdvice/"
menuArr[6][3] = new Array()
menuArr[6][3][1] = "Why GapGuru"
menuArr[6][3][2] = "About-Us/Why-Gapguru"
menuArr[6][4] = new Array()
menuArr[6][4][1] = "Contact Us"
menuArr[6][4][2] = "Contact-Us"
menuArr[6][5] = new Array()
menuArr[6][5][1] = "Special Offers"
menuArr[6][5][2] = "SpecialOffers/"
menuArr[6][6] = new Array()
menuArr[6][6][1] = "Gap Year Blogs"
menuArr[6][6][2] = "GapBlogs"
menuArr[6][7] = new Array()
menuArr[6][7][1] = "Gap Year Planning"
menuArr[6][7][2] = "GapYearPlanning/"
menuArr[6][8] = new Array()
menuArr[6][8][1] = "Flights & Insurance"
menuArr[6][8][2] = "GapYearPlanning/"
var v1 = document.getElementById("hdnField").value;
for(i=1;i<menuArr.length;i++)
{
	str = ''
	if(menuArr[i].length!=0)
	{
		str = str + '<div id="div'+i+'"  align="left" style="display:block;position:absolute; z-index:999;  border:2px solid #EDBFDB; left: 0px; background-color:#FFFFFF; padding:10px 10px 10px 5px; margin-top: 2px;visibility:hidden;" ><img src="'+ v1 + menuArr[i][0] + '"  alt="' +menuArr[i][1][0]+ '" title="' +menuArr[i][1][0]+ '" style="margin-left:6px; border:1px solid #599BC0;" width="144" height="71" />'
		str = str + '  <table class="menuBgColor" style="min-width:113px" cellpadding=0 cellspacing=0 > '
		for(j=1;j<menuArr[i].length;j++)
		{   str = str + '     <tr> '
			str = str + '		<td class="menuTdBorder" style="display:block; " valign="center"> <a href="'+v1+menuArr[i][j][2]+'" style="display:block" valign="center" class="anchGeneral" id="linkh'+i+''+j+'"><h4 style="font-size:12px"><strong class="clscolorhover" >'+menuArr[i][j][1]+'</strong></h4></a></td>'
			str = str + '    </tr>'
		}				
		str = str + '        </table>'
		str = str + ' </div>'
		document.write(str)	
		var el = document.getElementById('div'+i);
		if (typeof el.contains == 'undefined' ||typeof el.contains == 'null')
		{
			el.contains = function(node)
			{
				if (null == node)
					return false;
				if (this == node)
					return true;
				else return this.contains(node.parentNode);
			}
		}
		el.onmouseout = handle_mouseout;
	}
	else
	{
	}
}
document.write('<iframe id="posFrame" onmouseout="hide(current)" onmouseover="javascript:false;" scrolling="no" width="1px" frameborder="0" style="position:absolute;z-index:0;margin-left:10px; visibility:hidden;"></iframe>')

function handle_mouseout(e)
{
	e = (e) ? e : window.event;
	if (!this.contains(e.relatedTarget || e.toElement))
		hideSlowly();
}
function show(subMenu, mainMenu)
{
	try
	{
		clearTimeout(scrollTim)
	}
	catch(error){}
	current=subMenu
	var p=fGetXY(mainMenu);   
	try
	{
		if(document.all)
		{
			document.getElementById(subMenu).style.left= p[0]-1; 
			var h=document.getElementById(subMenu).style.left= p[0]-1; 
			document.getElementById(subMenu).style.top = p[1]+27;
			document.getElementById(subMenu).style.visibility="visible"
		}
		else
		{
			document.getElementById(subMenu).style.left=p[0]+'px';
			document.getElementById(subMenu).style.top = p[1]+27+'px';
			document.getElementById(subMenu).style.visibility="visible"
		}
		
	}
	catch(error){}

}
function hide(subMenu)
{
	try
	{
		document.getElementById("posFrame").style.visibility="hidden"
		document.getElementById(subMenu).style.visibility="hidden"
		document.getElementById(subMenu).style.top=0
		document.getElementById(subMenu).style.left=0
	}
	catch(error){}
}
function hideSlowly()
{
	scrollTim = setTimeout("hideAll()", 200);
}
function dontHideSlowly()
{
	try
	{
		clearTimeout(scrollTim)
	}
	catch(error){}
}


function hideAll()
{
	document.getElementById("posFrame").style.visibility="hidden"
	for(i=1;i<=(4+1);i++)
	{
		try
		{
			document.getElementById("div"+i).style.visibility="hidden"
			document.getElementById("div"+i).style.top=0
			document.getElementById("div"+i).style.left=0
			//Now reset the flash sequence at home page also.
			resetFlash();
		}
		catch(error){}
	}
}

function fGetXY(aTag)
{
 var p=[0,0];
 while(aTag!=null)
 {
	  p[0]+=aTag.offsetLeft;
	  p[1]+=aTag.offsetTop;
	  aTag=aTag.offsetParent;
 }
 return p;
}

