// ---------------------------------------------------------
// horz_nav.js
// ---------------------------------------------------------
var gstHeaderName = "welcome";

// ----------------------------------------------------------
// FUNCTION: MM_findObj(n, d)
// ----------------------------------------------------------
function MM_findObj(n, d) { //v3.0
  	var p,i,x;  
  	if(!d) {
		d=document; 
	}
  	if((p=n.indexOf("?"))>0&&parent.frames.length) {
    	d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
  	if(!(x=d[n])&&d.all) {
		x=d.all[n]; 
	}
	for (i=0;!x&&i<d.forms.length;i++) {
		x=d.forms[i][n];
	}
  	for(i=0;!x&&d.layers&&i<d.layers.length;i++) {
		x=MM_findObj(n,d.layers[i].document); 
	}
	return x;
}


// ----------------------------------------------------------
// FUNCTION: MM_swapImage()
// ----------------------------------------------------------
function MM_swapImage() { //v3.0
  var i,j=0,x;
  var a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3){
   	if ((x=MM_findObj(a[i]))!=null){
   	  document.MM_sr[j++]=x; 
	  if(!x.oSrc){
	    x.oSrc=x.src; 
	  }
	  x.src=a[i+2];
    }
  }	
}
// ----------------------------------------------------------
// FUNCTION: MM_swapImgRestore()
// ----------------------------------------------------------
function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

// ----------------------------------------------------------
// FUNCTION: Load_Tabs()
// ----------------------------------------------------------
function Load_HeaderPics(){
	
	if (document.images) {
  		welcome_f1 = new Image(110 ,25); welcome_f1.src = "images/tab_welcome_f1.gif";			
		welcome_f2 = new Image(110 ,25); welcome_f2.src = "images/tab_welcome_f2.gif";

		about_f1 = new Image(110 ,25); about_f1.src = "images/tab_about_f1.gif";			
		about_f2 = new Image(110 ,25); about_f2.src = "images/tab_about_f2.gif";

		practice_f1 = new Image(165 ,25); practice_f1.src = "images/tab_practice_f1.gif";			
		practice_f2 = new Image(165 ,25); practice_f2.src = "images/tab_practice_f2.gif";
		
		faqs_f1 = new Image(165 ,25); faqs_f1.src = "images/tab_faqs_f1.gif";			
		faqs_f2 = new Image(165 ,25); faqs_f2.src = "images/tab_faqs_f2.gif";

		links_f1 = new Image(110 ,25); links_f1.src = "images/tab_links_f1.gif";			
		links_f2 = new Image(110 ,25); links_f2.src = "images/tab_links_f2.gif";

   		contact_f1 = new Image(110 ,25); contact_f1.src = "images/tab_contact_f1.gif";			
		contact_f2 = new Image(110 ,25); contact_f2.src = "images/tab_contact_f2.gif";		  		
	}	
}

// ----------------------------------------------------------
// FUNCTION: Write_HeaderItem(stName, stLink, stTip, stWidth)
// ----------------------------------------------------------
function Write_HeaderItem(stName, stLink, stTip, stWidth)
{
	if (gstHeaderName==stName){
	    document.write('<TD>');
		document.write('<IMG height="25" src="images/tab_'+stName+'_f3.gif" width="'+stWidth+'" border=0" '); 
		document.writeln('name="'+stName+'" alt="'+stTip+'"></TD>');
	}
	else {				
	    document.write('<TD><A onmouseover="MM_swapImage(');
		document.write("'"+stName+"','','images/tab_"+stName+"_f2.gif', 1); ");
		document.write('" onmouseout="MM_swapImgRestore();" href="'+stLink+'" target="_top">');
		document.write('<IMG height="25" src="images/tab_'+stName+'_f1.gif" width="'+stWidth+'" border=0" '); 
		document.writeln('name="'+stName+'" alt="'+stTip+'"></A></TD>');
	}
}	

// ----------------------------------------------------------
// FUNCTION: Write_Header(stHeader)
// ----------------------------------------------------------
function Write_Header(stHeader)
{
	Load_HeaderPics();
	gstHeaderName = stHeader;

	stRightSide = "images/client_rightside_1.jpg";
	if (stHeader=="find" || stHeader=="value") {
		stRightSide = "images/client_rightside_2.jpg";
	}
	if (stHeader=="mortgage") {
		stRightSide = "images/client_rightside_3.jpg";
	}




	document.writeln('<table height="155" width="100%" cellpadding="0" cellspacing="0" border="0" ');
	document.writeln('  background="images/client_banner_bgnd.jpg">');
	document.writeln('  <tr><td width="100%" height="130" align="center"><img src="images/client_logo.gif" ');
	document.writeln('          border="0" /></td>');
	document.writeln('      <td width="404" height="130"><img src="'+stRightSide+'" ');
	document.writeln('			width="404" height="130" border="0" /></td></tr>');
	document.writeln('  <tr><td colspan="2" width="100%" height="25">');
	document.writeln('        <table height="25" cellpadding="0" cellspacing="0" border="0">');
	document.writeln('          <tr>');
	
	Write_HeaderItem('welcome', 'index.html', 'Home', '110');
	Write_HeaderItem('about', 'about.html', 'About Us', '110');
	Write_HeaderItem('practice', 'practice.html', 'Areas of Practice', '165');
	Write_HeaderItem('faqs', 'faqs.html', 'FAQs', '110');
	Write_HeaderItem('contact', 'contact.html', 'Contact Us', '110');
	Write_HeaderItem('links', 'links.html', 'Links', '110');
	
	document.writeln('           </tr></table>');
	// end inner
	document.writeln('</td></tr></table>');
}

function Write_Footer()
{
	document.writeln('<table border=0 cellspacing=0 cellpadding=0 width=100%>');
	document.writeln('<tr><td colspan=3 width=100%><hr size=1></td></tr>');
	document.writeln('<tr><td class=arttext valign="bottom" align="left" nowrap>'); 
	document.writeln('Doreen Inkeles, P.A.<br>');
	document.writeln('7300 W. McNab Road<br>');
	document.writeln('Suite 215<br>');
	document.writeln('Tamarac, FL 33321');
	document.writeln('</td>');
	document.writeln('<td class=arttext width="100%" valign="bottom" align="center">'); 
	document.writeln('&nbsp;&nbsp;');
	document.writeln('</td>'); 
	document.writeln('<td class=arttext valign="bottom" align="right" nowrap> '); 
	document.writeln('office: 954.757.1080<br>');
	document.writeln('fax: 267.373.6518<br>');
	document.writeln('info@inkeleslaw.com');
	document.writeln('</td>');		
	document.writeln('</tr>');
	document.writeln('<tr><td colspan=3 width=100%><hr size=1></td></tr>');

	document.writeln('<tr><td align="left">');  
	document.writeln('<a href="http://www.humanitects.com"><img src="images/ht_advert.gif" border=0 alt="" height=29 width=145></a>');
	document.writeln('</td>');
	document.writeln('<td align="center" class=arttext>');
	document.writeln('<font size="-2">All pages Copyright© 2007 Doreen Inkeles, P.A.<br>');
	document.writeln('<a href="http://www.inkeleslaw.com/sitemap.html">Sitemap</a><br>');
	document.writeln('</td>');
	document.writeln('<td align="right">');
	document.writeln('<a href="#top"><img src="images/btn_top.gif" border=0 alt="" height=25 width=75></a>');
	document.writeln('</td></tr>');	
	document.writeln('</table>');		
}