var clearAry = new Array(" ");
var arrayNm = "";
var screenTop;

//***function RESIZE() begins***

if (is.ns4) {
if(!window.saveInnerWidth) {
  saveInnerWidth = window.innerWidth;
  saveInnerHeight = window.innerHeight;
  window.onResize = resize;
   }
}
function resize() {
    if (saveInnerWidth != window.innerWidth || 
        saveInnerHeight != window.innerHeight ) 
    {
	document.location.href = document.location.href;
    }
}
                                                             
//***function HANDLER() begins***

function handler(e) {
screenTop = (is.ns)? window.pageYOffset : document.body.scrollTop; 
if (screenTop < col2Top) screenTop = col2Top;
}

document.onmousedown = handler;
if (is.ns) document.captureEvents(Event.MOUSEDOWN);


//***function LAYERWRITE() begins***

function layerWrite(id,num,arrayNm,coName,coURL) {
if (plat.indexOf("Mac") != -1 && is.ie5)  {
  var text = '<img src="/img/pix.gif" border=0 height=6 width=1><BR>';
   if(coName) {
	    text += '<span class="text"><b>';
	    text_len=coName.length;
		if(text_len < 28){
		  	text += coName;
			}
		else {
           	coName2=coName.substr(24);
			var increment = coName2.indexOf(' ');
			var wrap_pos=24+increment;
			text += coName.substr(0,wrap_pos) + "<BR>";
			text += coName.substr(wrap_pos+1);
		}
			
	       text += '</a></b></span><BR><img src="/img/pix.gif" border=0 height=3 width=1><BR>';
          text += arrayNm[num];
} else {
      text += arrayNm[num];
}
}
else {
   var text = '<table border=0 cellpadding=0 cellspacing=6>';
   if(coName) {
	    text += '<tr><td class="text"><b>';
	    text_len=coName.length;
		if(text_len < 28){
		  	text += coName;
			}
		else {
           	coName2=coName.substr(24);
			var increment = coName2.indexOf(' ');
			var wrap_pos=24+increment;
			text += coName.substr(0,wrap_pos) + "<BR>";
			text += coName.substr(wrap_pos+1);
		}
			
	    text += '</a></b></td></tr></table>';
       text += arrayNm[num];

} else {
   text += arrayNm[num];
}
}
	//Column 2 Top Definition based on Screen Position
    
	if (id == 'col4') screenTop = screenTop + 38;
       
		if (text != '') {
    	  if (is.ns4) {
			document.layers[id].top = 162;  
			}
		  else if (is.ie) {
			document.all[id].style.top = screenTop;
			}
		  else if (is.ns6) {
			document.getElementById(id).style.top=screenTop;
			}	
		}

	
	//End of Column 2 Top Definition

	if (is.ns4) {
		var lyr = document.layers[id].document;
		lyr.open();
		lyr.write(text);
		lyr.close();
	}
    else if (is.ie) {
		document.all[id].innerHTML = text;
	}
	else if (is.ns6) {
		var el = document.getElementById(id);
		while (el.hasChildNodes()) el.removeChild(el.lastChild);
		var r = el.ownerDocument.createRange();
		r.selectNodeContents(el);
		r.collapse(true);
		r.setStartBefore(el);
		var htmlFrag = r.createContextualFragment(text);
		el.appendChild(htmlFrag);
    }
}


//***function LAYERCLEAR() begins***

function layerClear() {
	layerWrite('col3','0',clearAry);
}
