var timer=new Array()
function ShowDiv(TheLayer,TheHref)
{

	if(document.getElementById(TheLayer)==null)
		return

	if(document.getElementById(TheLayer).offsetHeight<10)
		return

	if(document.getElementById(TheLayer).style.visibility=="visible")
		return false

	TheWidth=TheHref.offsetWidth
	if(TheHref.offsetParent)
	{
    	for( var posX = -1, posY = -10; TheHref.offsetParent; TheHref = TheHref.offsetParent )
		{
			posX += TheHref.offsetLeft;
			posY += TheHref.offsetTop;
	    }
	}

	posX=posX;
	if(TheLayer.indexOf("_")==-1)
		document.getElementById(TheLayer).style.left=posX+"px"
	else
		document.getElementById(TheLayer).style.left=posX+TheWidth+"px"
		
	TheAdj=22
	TheAdjtop=40
		
	if(navigator.appVersion.indexOf("MSIE")!=-1)
	{
		TheAdj=26
		TheAdjtop=40
	}
	
	
	if(TheLayer.indexOf("_")==-1)
		document.getElementById(TheLayer).style.top=posY+TheAdj+"px"
	else
		document.getElementById(TheLayer).style.top=posY+TheAdjtop+"px"
		
	document.getElementById(TheLayer).style.top=posY+TheAdjtop+"px"
	
	document.getElementById(TheLayer).style.visibility="visible"

	MainLayer=TheLayer.replace(/_\d+$/,"")
	HideExcept(MainLayer,TheLayer)
	StopTimer(TheLayer)
}
function HideDiv(TheLayer,TheI)
{
	MainLayer=TheLayer.replace(/_(\d+)/g,"")
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf(MainLayer)!=-1)
		{
			TheDivs[i].style.visibility="hidden"		
			TheDivs[i].style.left="0px"
			TheDivs[i].style.top="0px"
			clearInterval(timer[TheDivs[i].id])
		}
	}
}

function StartTimer(TheLayer)
{

	timer[TheLayer]=setInterval("HideDiv('"+TheLayer+"')",50)
	if(TheLayer.indexOf("_")!=-1)
	{
		StartTimer(TheLayer.replace(/_\d+$/,""))
	}
	
}



function StopTimer(TheLayer)
{
	MainLayer=TheLayer.replace(/_(\d+)/g,"")
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf(MainLayer)!=-1)
		{
			clearInterval(timer[TheDivs[i].id])
			timer[TheDivs[i].id]=""
		}
	}
}
function Goto(ThePage)
{
	//alert(ThePage)
	location.href=ThePage
	

}
function HideExcept(TheLayer,TheChild)
{
	SubTrees=TheLayer+"_"
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf(SubTrees)!=-1 && TheDivs[i].id!=TheChild && TheDivs[i].id.indexOf("_")!=-1)
		{
			if(TheDivs[i].id.indexOf(TheChild)==-1 || TheChild=="")
			{
				TheDivs[i].style.visibility="hidden"
				TheDivs[i].style.left="0px"
				TheDivs[i].style.top="0px"
				clearInterval(timer[TheDivs[i].id])
			}
		}
	}
}
function HideAll()
{
	for(i=0;i<TheDivs.length;i++)
	{
		if(TheDivs[i].id.indexOf("Layer")!=-1)
		{
			TheDivs[i].style.visibility="hidden"
			clearInterval(timer[TheDivs[i].id])
			timer[TheDivs[i].id]=""
		}
	}
}

document.write("<div id='Layer1' style='position:absolute; left:10px; top:0px; width:155px; z-index:10;visibility:hidden;  border: 1px none #DDE4FB;' onMouseOver='StopTimer(this.id)' onMouseOut='StartTimer(this.id);return false;'>");
document.write("<table cellpadding='2' height='155' width='135' cellspacing='0'   border='0' align='center' background='images/menubg.gif' style='background-repeat:no-repeat'>");

document.write("<tr><td width='140'  style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' class='menutxt' onclick=document.location.href='magic.asp' align='center' >Mixer Grinders</td></tr>");
document.write("<tr><td width='140' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt'   class='menutxt' onclick=document.location.href='dial.asp' align='center' >Induction Cooktops</td></tr>");


document.write("<tr><td width='140' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' class='menutxt' onclick=document.location.href='cookerPerf.asp' align='center' >AutoCookers/Warmers</td></tr>");

document.write("<tr><td width='140' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' class='menutxt' onclick=document.location.href='touch.asp' align='center' >Pressure Cooker</td></tr>");

document.write("<tr><td width='140' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt'   class='menutxt' onclick=document.location.href='grinder.asp' align='center' >Tabletop Grinders</td></tr>");

document.write("<tr><td width='140' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' class='menutxt' onclick=document.location.href='prontoss.asp' align='center' >Kettles/Coffee Makers</td></tr>");
<!--document.write("<tr><td width='140' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt'  style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' class='menutxt' onclick=document.location.href='#' align='center' >Microwave Ovens</td></tr>");-->

document.write("<tr><td width='140'  style='border-bottom:1px dotted #000000;cursor:pointer;cursor:hand' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt' class='menutxt' onclick=document.location.href='gasQuattro.asp' align='center' >Gas Stoves</td></tr>");

document.write("<tr><td width='140' onmouseover=this.className='menuover'  onmouseout=this.className='menutxt'  style='cursor:pointer;cursor:hand' class='menutxt' onclick=document.location.href='iron1000.asp' align='center' >Irons</td></tr>");



document.write("</table></div>");

function toggle(obj) {
	var el = document.getElementById(obj);


	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
		if(el.id=='spec'){
		document.getElementById('specimg').src='images/plus.gif'
		}
		else{
			document.getElementById('jarimg').src='images/plus.gif'
			}
	}
	else {
		el.style.display = '';
		if(el.id=='spec'){
		document.getElementById('specimg').src='images/minus.gif'
		}
		else{
			document.getElementById('jarimg').src='images/minus.gif'
			}
	}
}
 
 function ShowVideo(TheLayer1,TheHref1)
{

	if(document.getElementById(TheLayer1)==null)
		return

	if(document.getElementById(TheLayer1).offsetHeight<10)
		return

	if(document.getElementById(TheLayer1).style.visibility=="visible")
		return false

	TheWidth1=TheHref1.offsetWidth
	if(TheHref1.offsetParent)
	{
    	for( var posX1 = -1, posY1 = -10; TheHref1.offsetParent; TheHref1 = TheHref1.offsetParent )
		{
			posX1 += TheHref1.offsetLeft;
			posY1 += TheHref1.offsetTop;
	    }
	}

	posX1=posX1-325;
	if(TheLayer1.indexOf("_")==-1)
		document.getElementById(TheLayer1).style.left=posX1+"px"
	else
		document.getElementById(TheLayer1).style.left=posX1+TheWidth1+"px"
		
	TheAdj1=22
	TheAdjtop1=40
		
	if(navigator.appVersion.indexOf("MSIE")!=-1)
	{
		TheAdj1=26
		TheAdjtop1=40
	}
	
	
	if(TheLayer1.indexOf("_")==-1)
		document.getElementById(TheLayer1).style.top=posY1+TheAdj1+"px"
	else
		document.getElementById(TheLayer1).style.top=posY1+TheAdjtop1+"px"
		
	document.getElementById(TheLayer1).style.top=posY1+TheAdjtop1+"px"
	
	document.getElementById(TheLayer1).style.visibility="visible"
Showlanguage('1')
	
}
function HideVideo(){
	document.getElementById('video_layer').style.visibility="hidden"
		document.getElementById('showFlashDemo').innerHTML=""
	}
function Goto(TheFile){
	if(TheFile!=-1){
	document.location.href=TheFile
	}
	}
TheDivs=window.document.getElementsByTagName('Div')

function Showlanguage(langId){
	flashstr="english"
	
	if(langId==1){
	flashstr="english"
	}
	if(langId==2){
	flashstr="tamil"
	}
	if(langId==3){
	flashstr="hindi"
	}
	str="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='400' height='300'>";
	str+="<param name='movie' value='output/"+flashstr+".swf' /><param name='quality' value='high' />"
	str+="<embed src='output/"+flashstr+".swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='400' height='300'></embed></object>";
	

	document.getElementById('showFlashDemo').innerHTML=str;
}
	
