var i,menuCount,destPage;
menuCount=8;
var pageList = new Array("index","husin","pag","myndir","bokun","singar","svarao","samband")
var monthList = new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function goTo(tPage)
{
	destPage = pageList[tPage];
	window.location.href=destPage+".html";
}

function loadMenu()
{
	document.write('<table cellpadding="0" cellspacing="0" border="0" align="right">');
	document.write('<tr>');
	for(i=0;i<menuCount;i++)
	{
		document.write('<td><a href="javascript:goTo('+i+')"><img src="images/menu'+i+'.gif" id=m'+i+' border="0" onmouseover="swapImg('+i+',0)" onmouseout="swapImg('+i+',1)"></a>');
		document.write('<img src="images/spacer.gif" border="0" width="15" height="0" align="absmiddle"></td>');
	}
	document.write('</tr>');
	document.write('</table>');
}

function swapImg(mImg,mode)
{
	var sImg,sId,bImg;
	sId="m"+mImg;
	sImg = "menuover"+mImg;
	bImg = "menu"+mImg;
	
	if(mode==0)
		document.getElementById(sId).src="images/"+sImg+".gif";
	else
		document.getElementById(sId).src="images/"+bImg+".gif";	
}

function loadMonth()
{
	var tempMonth
	document.write('<select>');
	for (tempMonth in monthList)
	{
		document.write('<option>'+monthList[tempMonth]+'</option>');
	}
	document.write('<select>');
}

function loadDate()
{
	var tempDate,j
	tempDate="32";
	
	document.write('<select>');
	for (j=1;j<tempDate;j++)
	{
		document.write('<option>'+j+'</option>');
	}
	document.write('<select>');
}

function loadYear()
{
	document.write('<select>');
	document.write('<option>2005</option><option>2006</option><option>2007</option><option>2008</option><option>2009</option>');
	document.write('<select>');
	
}


/******************
	Function to give a popup window to display the enlarged view in Products page
		-- Stores the selected image id to a hidden value in form named prodFrm.
		-- The show.htm page which pops up takes the image id from this hidden value and renders to the browser
******************/
function viewBig(imgId)
{
	document.prodFrm.imgId.value = imgId;
	
	w=740;
	h=520;

	LeftP = (screen.width) ? (screen.width-w)/2 : 0;
	TopP  = (screen.height) ? (screen.height-h)/2 : 0;

	params="width="+w+",height="+h+",top="+TopP+",left="+LeftP+",resizable=1,scrollbars=1,menubar=0,toolbar=0,status=0"

	window.open("show.htm","",params);
}

