var content=new Array();
var glbInc, glbDec,glbHiResImg, glbImgVsize, gblOrgImgVsize, gblOrgImgHsize, gblImgId;

function populateArray()
{

 //content[0]='<div id="sl1" style="Z-INDEX:6; LEFT:0px; VISIBILITY:visible; '
 //  + 'WIDTH:800px; POSITION:relative; TOP:0px; HEIGHT:194px">GALLERY</div><div id="text1" style="Z-INDEX: 7; LEFT: 603px; VISIBILITY: visible; WIDTH: 261px; POSITION: relative; TOP: 0; HEIGHT: 94px"><font face="Verdana" size="1"> <div align="justify" class="pstext"></div> </font></div>';
 //readFileViaApplet('layer0.htm',0)
 
iFrameParms = 'name="iFrame_Content" width="995" height="440" align="left" scrolling="no" frameborder="0" allowtransparency="true"></iframe>'
content[0] = '<iframe src="home.htm"' + iFrameParms
content[1] = '<iframe src="gallery.htm"' + iFrameParms
content[2] = '<iframe src="about.htm"' + iFrameParms
content[3] = '<iframe src="contact.htm"' + iFrameParms
content[4] = '<iframe src="comments.htm"' + iFrameParms
content[5] = '<iframe src="gallery.htm"' + iFrameParms
}

function delayAction(content) {

FrameContent  = content
 // this function retrieves any information 
 // you need about the event, sets those values 
 // to global variables and sets up the actual 
 // action to happen in a specified period of time 


 // remember the event that triggered this 
 // function in case you need it later 
 //e = e || event; 
window.ActionTimer = setTimeout("changetext(FrameContent)", 350); 

} 

function clearAction() { 

 // this function clears the action if 
 // it hasn't actually happened yet 


 if (window.ActionTimer) { 
  // if they moused out and there is 
  // a running timer, clear it 
  clearTimeout(window.ActionTimer); 
  window.ActionTimer = null; 
 } 


} 

function doAction(parm) { 

 // this function does the actual work 
 // it picks up any information from the 
 // global variables set in 'delayAction' 

 alert(parm); 

 // this guarantees you can call setTimeout 
 // with a reference to 'doAction', rather 
    doAction.toString = function() { 
        return 'doAction();'; 
    } 

} 


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);

}

function dispMap(file, name){
	msgWindow = window.open(file, name, "toolbar=no,location=no,directories=no,status=no,menubar=0,resizable=1,scrollbars=yes,width=400,height=500")
}

function regenerate(){
window.location.reload()
}

function regenerate2(){
if (document.layers){
appear()
setTimeout("window.onresize=regenerate",450)
}
}


function changetext(whichcontent){

if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
//cross_el.innerHTML='<font face="Verdana"><small>'+whichcontent+'<font></small>'
cross_el.innerHTML=whichcontent

//MM_showHideLayers('descriptions','','show')
//cross_el.style.height=0
}
else if (document.layers){
// document.d1.document.d2.document.write('<font face="Verdana"><small>'+whichcontent+'</small></font>')
// document.d1.document.d2.document.close()

}
}

function changecontent(whichcontent) {
	//getcontent()
	i_text++
	if (i_text>=text.length) {i_text=0}	
	if (ie) {
		ticker.innerHTML=content
		//fadeout()
	}
	if (opera || ns6) {
		document.getElementById('ticker').innerHTML=content
		//var texttimer=setTimeout("changecontent()",2*textpause)
	}
	if (ns4) {
		document.roof.document.ticker.document.write(content)
		document.roof.document.ticker.document.close()
		//var texttimer=setTimeout("changecontent()",textpause)
	}	
}

function appear(){
document.d1.visibility='show'
}
function increaseSizeImage(hiResImage,ImgLrgVsize,ImgId) 
{

if(hiResImage != null) {
	document.getElementById(ImgId).src = hiResImage;
	glbImgVsize = ImgLrgVsize
	gblOrgImgVsize = document.getElementById(ImgId).height
	gblOrgImgHsize = document.getElementById(ImgId).width 
    gblImgId = ImgId
};

if(glbDec != null) {clearTimeout(glbDec); glbDec = null;}; 

if (document.getElementById(gblImgId).height < glbImgVsize) 
        {
                document.getElementById(gblImgId).height += 8 * (gblOrgImgVsize/gblOrgImgHsize); 
                document.getElementById(gblImgId).width += 8; 
                glbInc = setTimeout("increaseSizeImage()", 2); 
        };

}

function decreaseSizeImage() // will get back to its normal default size 
{ 
if(glbInc != null) {clearTimeout(glbInc); glbInc = null;}; 
//if (document.getElementById("idImage").height > gblOrgImgVsize) 
//        { 
//                document.getElementById("idImage").height -= 1; 
//                document.getElementById("idImage").width -= 1; 
//                glbDec = setTimeout("decreaseSizeImage()", 1); 
//        };


document.getElementById(gblImgId).height = gblOrgImgVsize
document.getElementById(gblImgId).width = gblOrgImgHsize
}



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function openWindow(url) {	
  window.open(URL,"openwindow","top=0,left=0") 	
}

