var strNav = '';
var imgPath = "";
var imgCount = 1;
var lastTitle = false;
var menuwidth=110
var offsetleft=0
var offsettop=143

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

function makeStatic() {
if (ie4) {
	if (document.body.scrollTop < 143){
		object1.style.pixelTop=document.body.scrollTop+offsettop
	}
	else{
		object1.style.pixelTop=document.body.scrollTop
	}
}
else if (ns6) {
	if(window.pageYOffset < 143){
		document.getElementById("object1").style.top=window.pageYOffset+offsettop
	}
	else{
		document.getElementById("object1").style.top=window.pageYOffset
	}
}
//Original: else if (ns4) {eval(document.object1.top=eval(window.pageYOffset+offsettop));}
else if (ns4) 
{
	if (eval(window.pageYOffset) < 143) {
		eval(document.object1.top=eval(window.pageYOffset+offsettop));
	}
	else {
		eval(document.object1.top=eval(window.pageYOffset));
	}

}
setTimeout("makeStatic()",0);
}

//Ravi added for floating
function startMenu(){
if (!document.layers)
document.write('<div id="object1" style="position:absolute">')

document.write('<span id="object2">');

<!--EDIT BELOW CODE TO YOUR OWN MENU-->
}
function endMenu(){
<!--END OF EDIT-->
document.write('</span>');

if (!document.layers)
document.write('<img src="../images/imgIcons.gif" alt="send this page to a friend" width="130" height="21" border="0" usemap="#Map"> ');
            document.write('<map name="Map">');
              document.write('<area shape="rect" coords="97,2,126,19" href="javascript:window.print()" alt="print this page">');
              document.write('<area shape="rect" coords="45,2,85,19" href="javascript:addbookmark()" alt="bookmark this page">');
              document.write('<area shape="rect" coords="1,3,43,19" href="../About/AboutContactForm.htm" alt="contact me">');
            document.write('</map>');
document.write('</div>')
menu3()
}
function menu3(){
if (ns6||ie4||ns4)
makeStatic()
}


function openMenu(){
	strNav = '<TABLE width="80" border="0" cellspacing="0" cellpadding="0">';
	strNav += '<TR>' +
		'<TD colspan="2"><img src="' + imgPath +'images/imgDotLine.GIF"></TD>' +
		'</TR>';

}

function closeMenu(){

	strNav +='<TR>'+ 
                '<TD colspan="2"><img src="' + imgPath +'images/imgDotLine.GIF"></TD>'+
              '</TR>';



	strNav +=		   '<TR>' +
				 '<TD height="20" valign="top" width="8"><img name="bul'+imgCount+'" src="' + imgPath +'images/imgRedDot.gif" ></TD>'+
				 '<TD width="104" class="topicSmall" ><A href="javascript:void(0); onclick=getPageName();" style="text-decoration:none">Comments</A><font color="#FF9700"> : </font> <A href="../About/AboutSearch.htm" style="text-decoration:none"><font face="Webdings" size="4">L</font></A></TD>'+
'<TR>'+
'<TD colspan="2"><img src="' + imgPath +'images/imgDotLine.GIF"></TD>'+
              '</TR>' ;
	strNav +=		   '<TR>'+
				 '<TD height="20" valign="top" width="8"><img name="bul'+imgCount+'" src="' + imgPath +'images/imgRedDot.gif" ></TD>'+
				 '<TD width="104" class="topicSmall" ><A href="#" style="disply:none"></A><A href="javascript:window.scrollTo(0,0)" class="topicSmall" style="text-decoration: none" onMouseOver="mOver(\'bul'+ imgCount +'\',\'images/imgRedDotOver.gif\')" onMouseOut="mOut(\'bul'+ imgCount +'\',\'images/imgRedDot.gif\')">Top</A><font color="#FF9700"> : </font><A href="javascript:history.back();" class="topicSmall" style="text-decoration: none" >Back</A><font color="#FF9700"> : </font><A href="../index.html" class="topicSmall" style="text-decoration: none">Home</A></TD>'+
			   '</TR>'+
			'</TABLE>';
	document.write(strNav);
}

function addMenuHead(strHead,strLink){
strNav += '<TR>' +
				 '<TD colspan="2" class="topic"><A href='+ strLink + ' style="text-decoration: none">'+ strHead +'</A></TD>' +
			   '</TR>' +
		  '<TR>' +
				 '<TD colspan="2" class="font3px">&nbsp;</TD>' +
			   '</TR>'


}


function addMainTitle(mtTitle,mlLink){
	
			   strNav += '<TR>' +
				 '<TD colspan="2"><img src="' + imgPath +'images/imgDotLine.GIF"></TD>' +
			   '</TR>'+
			   '<TR>'+
				 '<TD height="20" valign="top" width="8"><img name="bul'+imgCount+'" src="' + imgPath +'images/imgRedDot.gif" ></TD>'+
				 '<TD width="92" class="navLink1" ><A href="#" style="disply:none"></A><A href="'+ mlLink +'" class="navLink1" style="text-decoration: none" onMouseOver="mOver(\'bul'+ imgCount +'\',\'images/imgRedDotOver.gif\')" onMouseOut="mOut(\'bul'+ imgCount +'\',\'images/imgRedDot.gif\')">' + mtTitle + '</A></TD>'+
			   '</TR>';

	imgCount++;
}

function addSubTitle(stTitle,slLink,lastTitle){

if(!lastTitle){

	strNav +=	'<TR>'+ 
                      '<TD valign="top" width="20">&nbsp;<img name="bul'+imgCount+'" src="' + imgPath +'images/imgRedBlocks.gif" ></TD>'+
                      '<TD  class="navLink2" valign="top" width="104"><font color="#000000"><A href="'+ slLink +'" class="navLink2" style="text-decoration: none" onMouseOver="mOver(\'bul'+ imgCount +'\',\'images/imgRedBlocksOver.gif\')" onMouseOut="mOut(\'bul'+ imgCount +'\',\'images/imgRedBlocks.gif\')">'+ stTitle +'</A></font></TD>'+
                '</TR>'+
              '<TR>' +
                      '<TD colspan="2" valign="top"><img  src="' + imgPath +'images/BLANK.gif" width="122" height="3"></TD>'+
              '</TR>';
			  
	}else{
	strNav +=	'<TR>'+ 
                      '<TD valign="top" width="10"><img name="bul'+imgCount+'" src="' + imgPath +'images/imgRedBlocks.gif" ></TD>'+
                      '<TD  class="navLink2" valign="top" width="90"><font color="#000000"><A href="'+ slLink +'" class="navLink2" style="text-decoration: none" onMouseOver="mOver(\'bul'+ imgCount +'\',\'images/imgRedBlocksOver.gif\')" onMouseOut="mOut(\'bul'+ imgCount +'\',\'images/imgRedBlocks.gif\')">'+ stTitle +'</A></font></TD>'+
                '</TR>';
	
	}
	
	imgCount++;
}

function openSubMenu(){
	lastTitle = false;
	strNav +='<TR>'+
                '<TD colspan="2" ><img src="' + imgPath +'images/imgDotLine.GIF"></TD>'+
              '</TR>'+
              '<TR>'+
                '<TD >&nbsp;</TD>'+
                '<TD width="100">'+
				  '<TABLE width="100" border="0" cellspacing="0" cellpadding="0">'+
					'<TR>'+
                      '<TD colspan="2"><img src="' + imgPath +'images/BLANK.GIF" width="10" height="4"></TD>'+
                    '</TR>';/*+
					'<TR>' +
                      '<TD colspan="2" ><img src="' + imgPath +'images/imgBlackDots.gif" width="122" height="3"></TD>'+
                    '</TR>';*/
					
}

function closeSubMenu(){

strNav += '<TR>'+
              '<TD colspan="2"><img src="' + imgPath +'images/BLANK.GIF" width="10" height="4"></TD>'+
              '</TR>'+
		'</TABLE></TD></TR>';
}

function myalert(myVar)
{
alert(myVar);

}

function mOver(name,image){

var rPath=imgPath + image;
	document.images[name].src = rPath;
	
}

function mOut(name,image){
var rPath=imgPath + image;
	document.images[name].src = rPath;;

}
function getPrevNextChapter()
{
var txt=parent.location.href
var x=txt.indexOf("=")
if (x==-1) 
  {
     x= txt.lastIndexOf("/")
  }

l_url = txt.substr(x+1);  //BP1chap_2.htm
l_url_bef_dot =  l_url.split(".")[0]; // BP1chap_2
l_url_aft_dot =  l_url.split(".")[1]; //htm
l_url_curr_chap_no_bef = l_url_bef_dot.split("_")[0]; //BP1chap
l_url_curr_chap_no= l_url_bef_dot.split("_")[1]; //2


l_url_next_chap_url = l_url_curr_chap_no_bef + "_" + eval(eval(l_url_curr_chap_no) +1) +".htm";
l_url_prev_chap_url = l_url_curr_chap_no_bef + "_" + eval(eval(l_url_curr_chap_no) -1) +".htm"; 
l_url_toc_url = l_url_curr_chap_no_bef + "_" + "0.htm"; 

//document.write('<span style="color:red;"> Next Chapter = ' + l_url_next_chap_url + '</span> <br>');
//document.write('<span style="color:red;"> Prev Chapter = ' + l_url_prev_chap_url + '</span>');
}

