 var menu=function(){
	var t=15,z=50,s=6,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t); c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();

function header(deep)
{
document.write('<div id="outerContainer"><div id="innerContainer"><div id="logo"><img src="'+deep+'images/bitstream_logo.jpg" alt="Bitstream Logo"class="logoBitstream" /><a href="'+deep+'index.html"><img src="'+deep+'images/bolt_logo.jpg" alt="Bolt Logo" width="185" height="59" class="logoBolt" /></a></div><div class="clear"></div><div id="nav"><a href="mailto:contact@boltbrowser.com"><img src="'+deep+'images/envelope.jpg" alt="email link" style="margin:0px; padding:16px 47px 0px 0px; float:right;" /></a><ul class="menu" id="menu"><li><a href="'+deep+'index.html">HOME</a></li><li>|</li><li><a href="'+deep+'dnld.html">DOWNLOAD</a><ul><li><a href="'+deep+'dnld.html#BOLTFull">Java ME</a></li><li><a href="'+deep+'dnld.html#BOLTLite">Java ME Lite</a></li><li><a href="'+deep+'android/index.html">Android</a></li><li><a href="'+deep+'dnld.html#BOLTbb">Blackberry</a></li><li><a href="'+deep+'in/index.html">Indic</a></li></ul></li><li>|</li><li><a href="'+deep+'press_room.html" class="menulink">PRESS</a></li><li>|</li><li><a href="#" class="menulink">HELP</a><ul><li><a href="'+deep+'support.html">Support</a></li><li><a href="#">FAQ</a><ul><li><a href="'+deep+'faq.html">Java ME</a></li><li><a href="'+deep+'faq_android.html">Android</a></li></ul></li><li><a href="http://boltbrowser.com/forums/">Discussion Forum</a></li></ul></li><li>|</li><li><a href="http://boltbrowser.com/demo">DEMO</a></li><li>|</li><li><a href="'+deep+'about.html">ABOUT</a></li></ul></div>')
}

function footer(deep)
{document.write('<div id="footer1"><ul><li><a href="http://www.facebook.com/pages/BOLT-Browser/242852025463?ref=ts"><img src="'+deep+'images/Facebook.png"/></a></li><li><a href="http://twitter.com/boltbrowser"><img src="'+deep+'images/twitter.png"/></a></li><li><a href="http://www.mobilevillage.com/awards.htm"><img src="'+deep+'images/mobilevillage.png"/></a></li><li><a href="http://www.mobilemeritawards.com/submit.html"><img src="'+deep+'images/MobileMeritAwards.png"/></a></li> <li><a href="http://bolt.en.softonic.com/phones"><img src="'+deep+'images/SoftonicAward.png"/></a></li> </div><div id="footer"><ul><li><a href="http://boltbrowser.com/forums/">FORUM</a></li><li>|</li><li><a href="'+deep+'b2b.html">B2B</a></li><li>|</li><li><a href="'+deep+'sdk.html">SDK</a></li></ul><div class="clear"></div><div id="footer"><p>&copy;2011 Bitstream, Marlborough MA. All rights reserved. - <a href="'+deep+'privacy.html">Privacy Policy</a></p></div>')
}


function showDivLink(ver, platform) 
{	
	var vver = Math.ceil(ver * 100);

	if(typeof(platform)=="undefined"){
		platform = '';
	}
	
	if (platform=='bb'){	
	var LinkHTML = "<ul><li> BOLT BlackBerry Version "+ver;
	LinkHTML = LinkHTML + " download links </li><li>BlackBerry: <a href='http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/boltbb.jad'>http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/boltbb.jad</a></li></ul>";			
		}
	else {	
	if (platform=='lw'){
		var vername='Lite';
	}
	else{
		var vername='Full';
	}
	var LinkHTML = "<ul><li> BOLT "+vername+" Version "+ver;
	LinkHTML = LinkHTML + " download links </li><li>Dual Signed Version: <a href='http://boltbrowser.com/rel/v"+ vver;
	LinkHTML = LinkHTML + "/bolt"+platform+"s2.jad'>http://boltbrowser.com/rel/v"+ vver;
	LinkHTML = LinkHTML + "/bolt"+platform+"s2.jad</a></li><li>VeriSign Signed Version: <a href='http://boltbrowser.com/rel/v"+ vver;
	LinkHTML = LinkHTML + "/bolt"+platform+"vs.jad'>http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/bolt"+platform+"vs.jad</a></li><li>Thawte Signed Version: <a href='http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/bolt"+platform+"ts.jad'>http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/bolt"+platform+"ts.jad</a></li><li>Unsigned Version: <a href='http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/bolt"+platform+".jad'>http://boltbrowser.com/rel/v"+vver;
	LinkHTML = LinkHTML + "/bolt"+platform+".jad</a></li></ul>";
	}


	if (document.getElementById)
	{ // DOM3 = IE5, NS6
		document.getElementById('InnerVer').innerHTML = LinkHTML;
                //document.getElementById('InnerVer').style.visibility = 'visible';
                document.getElementById('InnerVer').style.display = 'inline';
	}
	else
	{
		if (document.layers) 
		{ // Netscape 4
			//document.InnerVer.visibility = 'visible';
			document.InnerVer.display = 'inline';
		}
		else
                { // IE 4
			//document.all.InnerVer.style.visibility = 'visible';
			document.all.InnerVer.style.display= 'inline';
                }
	}
}

function ddChange(slected_version)
{
/*	alert (slected_version);*/
document.getElementById("InnerVer").style.display="none";

	showDivVer();
	
	var VerHTML = '<ul><li><a href="javascript:showDivLink('+ slected_version;
	VerHTML = VerHTML +''+')">BOLT Full</a></li><li><a href="javascript:showDivLink('+ slected_version;
	VerHTML = VerHTML +",'lw'"+')">BOLT Lite</a></li><li><a href="javascript:showDivLink('+ slected_version;
	VerHTML = VerHTML +",'bb'"+')">BOLT BlackBerry</a></li></ul>';

	if (document.getElementById)
	{ // DOM3 = IE5, NS6
		document.getElementById('divVer').innerHTML = VerHTML;
                //document.getElementById('divVer').style.visibility = 'visible';
                document.getElementById('divVer').style.display = 'inline';
	}
	else
	{
		if (document.layers) 
		{ // Netscape 4
			//document.divVer.visibility = 'visible';
			document.divVer.display = 'inline';
		}
		else
                { // IE 4
			//document.all.divVer.style.visibility = 'visible';
			document.all.divVer.style.display= 'inline';
                }
	}
}

function hide(id)
{
	document.getElementById(id).style.display="none";
}

function popup(url, w, h) {
	docHeight = (document.body.clientHeight - 700);
	var popupHTML = "<div style='padding:3px; background-color:#666666;'><a href='javascript:hide(\"toppop\")'><b>[ Click to close ]</b></a></div><div><img src="+url+" /></div>";
	document.getElementById('toppop').innerHTML = popupHTML;
	document.getElementById('toppop').style.width = w+'px';
	document.getElementById('toppop').style.top = +docHeight+'px';
	document.getElementById('toppop').style.display = 'inline';
	//alert (document.body.clientHeight);
	//alert (docHeight);
}
