var SqPicPosX=168,SqPicPosY=300;
var MenuPosX=100,MenuPosY=240; 
var minH=570, minW=500;

function openInWindow (fileName,w,h) {
		 open(fileName,"picture","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,width="+w+",height="+h)
}
function GetPictures(Path) {
		if (document.images)
		{	

			SqPic0_on = new Image();
			SqPic0_on.src = Path+"SqPic0.gif";

			SqPic1_on = new Image();
			SqPic1_on.src = Path+"SqPic1.gif";

			SqPic2_on = new Image();
			SqPic2_on.src = Path+"SqPic2.gif";

			SqPic3_on = new Image();
			SqPic3_on.src = Path+"SqPic3.gif";

			SqPic4_on = new Image();
			SqPic4_on.src = Path+"SqPic4.gif";

			SqPic5_on = new Image();
			SqPic5_on.src = Path+"SqPic5.gif";

			SqPic6_on = new Image();
			SqPic6_on.src = Path+"SqPic6.gif";

			SqPic7_on = new Image();
			SqPic7_on.src = Path+"SqPic7.gif";

			SqPic8_on = new Image();
			SqPic8_on.src = Path+"SqPic8.gif";


			SqPic11_on = new Image();
			SqPic11_on.src = Path+"SqPic11.gif";

//-------------
			SqPic0_off = new Image();
			SqPic0_off.src = Path+"SqPic0L.gif";

			SqPic1_off = new Image();
			SqPic1_off.src = Path+"SqPic1L.gif";

			SqPic2_off = new Image();
			SqPic2_off.src = Path+"SqPic2L.gif";

			SqPic3_off = new Image();
			SqPic3_off.src = Path+"SqPic3L.gif";

			SqPic4_off = new Image();
			SqPic4_off.src = Path+"SqPic4L.gif";

			SqPic5_off = new Image();
			SqPic5_off.src = Path+"SqPic5L.gif";

			SqPic6_off = new Image();
			SqPic6_off.src = Path+"SqPic6L.gif";

			SqPic7_off = new Image();
			SqPic7_off.src = Path+"SqPic7L.gif";

			SqPic8_off = new Image();
			SqPic8_off.src = Path+"SqPic8L.gif";


			SqPic11_off = new Image();
			SqPic11_off.src = Path+"SqPic11L.gif";


			m11 = new Image();
			m11.src = "pictures/return_off.gif";

			m11_on = new Image();
			m11_on.src = "pictures/return_on.gif";

			m1 = new Image();
			m1.src = "pictures/menu_off.gif";
			m1_on = new Image();
			m1_on.src = "pictures/menu_on.gif";

			m2 = new Image();
			m2.src = "pictures/menu_off.gif";
			m2_on = new Image();
			m2_on.src = "pictures/menu_on.gif";
		
			m3 = new Image();
			m3.src = "pictures/menu_off.gif";
			m3_on = new Image();
			m3_on.src = "pictures/menu_on.gif";
			
			m4 = new Image();
			m4.src = "pictures/menu_off.gif";
			m4_on = new Image();
			m4_on.src = "pictures/menu_on.gif";
			
			m5 = new Image();
			m5.src = "pictures/menu_off.gif";
			m5_on = new Image();
			m5_on.src = "pictures/menu_on.gif";
			
			m6 = new Image();
			m6.src = "pictures/menu_off.gif";
			m6_on = new Image();
			m6_on.src = "pictures/menu_on.gif";

			m7 = new Image();
			m7.src = "pictures/menu_off.gif";
			m7_on = new Image();
			m7_on.src = "pictures/menu_on.gif";

			m8 = new Image();
			m8.src = "pictures/menu_off.gif";
			m8_on = new Image();
			m8_on.src = "pictures/menu_on.gif";
			

			m0 = new Image();
			m0.src = "pictures/menu_off.gif";
			m0_on = new Image();
			m0_on.src = "pictures/menu_on.gif";

			mblink = new Image();
			mblink.src = "pictures/menu_blink.gif";

			MArrowPicSteady = new Image();
			MArrowPicSteady.src = "menuarrow.gif";
			MArrowPicBlink= new Image();
			MArrowPicBlink.src = "menuarrow_blink.gif";

		}
}  // GetPictures
<!-- -------------------------------------------------------------------------------- -->
	function lpre_msover1(layer, name) {	

		if (document.images) {
			if (document.layers) document.layers[layer].document.images[name].src = eval (name + "_on.src");
			else		document.all[layer].document.images[name].src = eval (name +  "_on.src");
		}
		return true;
	}
<!-- --------------------------------------------------------- -->
	function lpre_msover(layer, name) {	
		if (document.images) {
			if (document.layers) document.layers[layer].document.images[name].src = eval (name + "_on.src");
			else		document.all[layer].document.images[name].src = eval (name + "_on.src");
		}
            var PicNr=name.substring(1,name.length-2+2);
            lpre_msover1('SquarePic'+PicNr,'SqPic'+PicNr);
		return true;
	}
<!-- --------------------------------------------------------- -->
     function ResetSqPic(layer,name) {   
		if (document.images) {
			if (document.layers) document.layers[layer].document.images[name].src = eval (name + "_off.src");
			else		document.all[layer].document.images[name].src = eval (name + "_off.src");
		}
           
           return true;
    } 
<!-- --------------------------------------------------------- -->
	function lpre_msout(layer, name) {	
		if (document.images) {
			if (document.layers) document.layers[layer].document.images[name].src = eval (name + ".src");
			else		document.all[layer].document.images[name].src = eval (name + ".src");
		}

            var PicNr=name.substring(1,name.length-2+2);
            ResetSqPic('SquarePic'+PicNr,'SqPic'+PicNr);
		return true;
	}
<!-- --------------------------------------------------------- -->
	function lpre_msout1(layer, name) {	
		if (document.images) {
			if (document.layers) document.layers[layer].document.images[name].src = eval ("mblink.src");
			else		document.all[layer].document.images[name].src = eval ("mblink.src");
		}
            ResetSqPic('SquarePic','SqPic');
		return true;
	}
<!-- --------------------------------------------------------- -->
    
function WriteLayers(w,h) {

writeCSS (css('men11', 10,559 , 199, 36, null, 'visible', 5)+
 css('SlideMenu', MenuPosX, MenuPosY, 199, 176, null, 'visible', 5)+
 css('men0', 10, 300, 199, 36, null, 'visible', 5)+
 css('men1', 10, 300, 199, 36, null, 'visible', 5)+
 css('men2', 10, 300, 199, 36, null, 'visible', 5)+
 css('men3', 10, 300, 199, 36, null, 'visible', 5)+
 css('men4', 10, 300, 199, 36, null, 'visible', 5)+
 css('men5', 10, 300, 199, 36, null, 'visible', 5)+
 css('men6', 10, 300, 199, 36, null, 'visible', 5)+
 css('Welcome',82,h-144,292,34,null,'visible',23)
)
document.writeln("<A name=start></A>");
}
<!-- --------------------------------------------------------- -->
function WriteSqPic(a,Link,MenNr,MNr) {
      document.writeln("<DIV id=SquarePic"+a+">");
      document.writeln("    <A href='"+Link+"' onclick=lpre_msover('"+MenNr+"','"+MNr+"') onmouseout=lpre_msout('"+MenNr+"','"+MNr+"')"); 
	document.writeln("    onmouseover=lpre_msover('"+MenNr+"','"+MNr+"') target=_top class=SqPicAsLink>");
      document.writeln("<IMG alt='' border='0' name=SqPic"+a+" src='SqPicsMain/1/SqPic"+a+"L.gif'>");
      document.writeln("</a></DIV>"); 
}
<!-- --------------------------------------------------------- -->

function WriteMenuOption(LinkName,Link,MenNr,MNr,ArrowClass,LinkClass,Blink) {
	
	document.writeln("<DIV id="+MenNr+"> <tr> ");
	document.writeln("  <td height='20' valign='bottom'  align='left'>");
      if (Blink=='false')  {	
      	document.writeln("    <A href='"+Link+"' onclick=lpre_msover('"+MenNr+"','"+MNr+"') onmouseout=lpre_msout('"+MenNr+"','"+MNr+"')"); 
		document.writeln("    onmouseover=lpre_msover('"+MenNr+"','"+MNr+"') target=_top class="+ArrowClass+">");
		document.writeln("  <IMG alt='' border='0' height=16 width=16 name="+MNr+" src='pictures/menu_off.gif' >");
		document.writeln("</A></td> <td valign='top' align='left'>");
		document.writeln("   <A href='"+Link+"' onclick=lpre_msover('"+MenNr+"','"+MNr+"') onmouseout=lpre_msout('"+MenNr+"','"+MNr+"')"); 
		document.writeln("onmouseover=lpre_msover('"+MenNr+"','"+MNr+"') target=_top class="+LinkClass+">");
            document.writeln(LinkName+" &nbsp;</A>&nbsp;");
        }
      if (Blink=='true')  {	
      	document.writeln("    <A href='"+Link+"' onclick=lpre_msover('"+MenNr+"','"+MNr+"') onmouseout=lpre_msout1('"+MenNr+"','"+MNr+"')"); 
		document.writeln("    onmouseover=lpre_msover('"+MenNr+"','"+MNr+"') target=_top class="+ArrowClass+">");
		document.writeln("  <IMG alt='' border='0' height=16 width=16 name="+MNr+" src='pictures/menu_blink.gif' >");
		document.writeln("</A></td> <td valign='top' align='left'>");
		document.writeln("   <A href='"+Link+"' onclick=lpre_msover('"+MenNr+"','"+MNr+"') onmouseout=lpre_msout1('"+MenNr+"','"+MNr+"')"); 
		document.writeln("onmouseover=lpre_msover('"+MenNr+"','"+MNr+"') target=_top class="+LinkClass+">");
            document.writeln(LinkName+" &nbsp;</A>&nbsp;");
        }
	document.writeln("</td></tr></DIV>");
}
<!-- --------------------------------------------------------- -->

function WriteMenu(CurrLinkNr) {

findWH();

GetPictures('SqPicsMain/1/');

WriteLayers(winW,winH);

document.writeln("<DIV id=SlideMenu>");
document.writeln("<DIV id=RedVLine></DIV>");

document.writeln("<table border='0' cellpadding='0' cellspacing='0' >");
//document.writeln("<tr><td><DIV id=RedVLine></DIV></td></tr>");

var Links=new Array ("Home","Company Profile","Scope Of Services","Intent Of FSA","Fire Alarm Systems","Company Officers of FSA","Employment opportunities","Contact Us");
var LinksUrl=new Array ("index.html","company.html","scopeOfServices.html","intentOfFsa.html","ourSystems.html","officers.html","employment.html","contactus.html");



 for(var a=1;a<Links.length;a++) {
   if (CurrLinkNr==a)  WriteMenuOption(Links[a],LinksUrl[a],'men'+a,'m'+a,'menuLink','menuLinkCurr','true');
     else  WriteMenuOption(Links[a],LinksUrl[a],'men'+a,'m'+a,'menuLink','menuLink','false');
}
document.writeln("</table> </DIV>");

      for(var a=1;a<Links.length;a++)  writeCSS (css('SquarePic'+a,a*78,winH-85, 57,57 , null, 'visible', 6));
      writeCSS (css('BottomGrey',0,winH-69,winW,69 , null, 'visible', 2));
	for(var a=1;a<Links.length;a++) {
	     WriteSqPic(a,LinksUrl[a],'men'+a,'m'+a);
	 }

document.writeln("<DIV id=GreyVLine></DIV>");


} //WriteMenu
<!-- --------------------------------------------------------- -->

function WriteBigPull() 
{
  var docu=""; 
  docu="<DIV id=BigPull><img align=left valign=top src='BigPull.jpg'  hspace='0' vspace='0' width='141' height='137' border='0'>";
  docu+="</DIV>";
  document.writeln(docu);
}
<!-- --------------------------------------------------------- -->

function WriteWelcome() 
{
  var docu=""; 
  docu="<DIV id=Welcome><img align=left valign=top src='welcome.gif'  hspace='0' vspace='0' width='292' height='34' border='0'>";
  docu+="</DIV>";
  findWH();
  if (winH>minH) document.writeln(docu);
//  alert(" W: "+winW+"  H:"+winH);
}


<!-- --------------------------------------------------------- -->
function WriteLogo(LogoNr)
{
 var docu=""; 
 docu="<DIV id=Fsa>";
 if (LogoNr==1)  docu+="<img align=left name='TopLogo' src='images/fsa.jpg' border='0'  hspace='0'  width='676' height='59'  usemap=\"#hidden_link\"> ";
 if (LogoNr==2)  docu+=" <img align=left name='TopLogo' src=\"images/logo3.gif\" border=\"0\"  vspace=\"0\" hspace=\"0\"  width=\"520\" height=\"60\"  usemap=\"#hidden_link\">";
 if (LogoNr==5)  docu+=" <img align=left name='TopLogo' src=\"images/logo5.gif\" border=\"0\"  vspace=\"0\" hspace=\"0\"  width=\"520\" height=\"60\"  usemap=\"#hidden_link\">";
 if (LogoNr==4)  docu+=" <img align=left name='TopLogo' src=\"images/logo310.gif\" border=\"0\"  vspace=\"0\" hspace=\"0\"  width=\"650\" height=\"60\"  usemap=\"#hidden_link\">";

 docu+="</DIV>";
 document.writeln(docu);
}  //WriteLogo
<!-- --------------------------------------------------------- -->
function WriteLeftFire(kind) 
{
  var light=0;
  var medium=1;
  var dark=2;
  var docu=""; 

  if (kind==light) docu="<td width=1 valign=bottom align=left   background='images/og_anim4.gif' height=100%>";
  if (kind==medium) docu="<td width=1 valign=bottom align=left   background='images/og_anim4.gif' height=100%>";
  if (kind==dark) docu="<td width=1 valign=bottom align=left   background='images/og_anim.gif' height=100%>";

  docu+="<img src='images/clear.GIF'  hspace='0' vspace='0' width='34' height='1'>";
  docu+="</td>";
 
  docu+="<td width=1 valign=bottom align=left   background='images/b1.gif' height=100%>";
  docu+="<img src='images/clear.GIF'  hspace='0' vspace='0' width='9' height='1' >";
  docu+="</td>";

  document.writeln(docu);
}
<!-- --------------------------------------------------------- -->
function PsRandom() { 
 var the_date = new Date();
 var the_second = the_date.getSeconds();
 var the_rand =Math.round(the_second/2)-(the_second/2);
// alert("The time is now: " + the_second+ " "+the_rand); 
 return the_rand;
}
<!-- --------------------------------------------------------- -->
function ccbrowsercheck(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);
	return this;
}
//-------------------------------------------------------------------------

function cchidediv(div){
	if(bw.bw){
		div="divLoadCont"
		obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?document[div]:0; 
		obj.visibility='hidden';
	}
}
//-------------------------------------------------------------------------




