var whatsfile ='';
var whichDog =null;
function init(filename)
{
	whatsfile = filename;
}
function init2(filename)
{
	whatsfile = filename;
}
function init3(filename)
{
	whatsfile = filename;
}

function openWhatsthis()
{
	
	document.getElementById('whatslayer').style.display='';
	document.getElementById('whatsthisfrm').src = whatsfile;	
	document.getElementById('whatslayer').style.top = getScrollXY();
}
  
function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return scrOfY;
}

function opendivwindow(filename,headtitle)
{
	document.getElementById('newcustomlayer').style.display='';
	document.getElementById('lbltitle').innerText=headtitle;
	document.getElementById('newcustomlayer').style.top = getScrollXY();
	document.getElementById('customfrm').src = filename;
	whichDog=isIE ? document.all.newcustomlayer : document.getElementById("newcustomlayer"); 

}
function closewin()
{
	document.getElementById('whatslayer').style.display='none';
}



function opendivwindow_flash(filename,headtitle,wid,hei)
{
	document.getElementById('newcustomlayer_flash').style.height=hei;
	document.getElementById('newcustomlayer_flash').style.width=wid;
	document.getElementById('newcustomlayer_flash').style.display='';
	document.getElementById('lbltitle_flash').innerText=headtitle;
	document.getElementById('newcustomlayer_flash').style.top = getScrollXY();
	document.getElementById('customfrm_flash').src = filename;
	document.getElementById('customfrm_flash').height = hei-50;
}



function closecustomwin_flash(filename,headtitle,wid,hei)
{
	document.getElementById('newcustomlayer_flash').style.display='none';
}


function closecustomwin()
{
	document.getElementById('newcustomlayer').style.display='none';
}

function opendivwindow2_old(filename,headtitle,wid,hei) 
{
	document.getElementById('newcustomlayer2').style.height=hei;
	document.getElementById('newcustomlayer2').style.width=wid;
	document.getElementById('newcustomlayer2').style.display='';
	
	document.getElementById('lbltitle2').innerText=headtitle;
	document.getElementById('newcustomlayer2').style.top = getScrollXY();
	document.getElementById('customfrm2').src = filename;	
	document.getElementById('customfrm2').height = hei-50;	
	whichDog=isIE ? document.all.newcustomlayer2 : document.getElementById("newcustomlayer2"); 

}



function opendivwindow2(filename,headtitle,wid,hei) 
{
	document.getElementById('newcustomlayer_drag').style.height=hei;
	document.getElementById('newcustomlayer_drag').style.width=wid;
	document.getElementById('newcustomlayer_drag').style.display='';
	
	document.getElementById('titleBar').innerText=headtitle;
	document.getElementById('newcustomlayer_drag').style.top = getScrollXY();
	document.getElementById('customfrm2_drag').src = filename;	
	document.getElementById('customfrm2_drag').height = hei-50;	
	whichDog=isIE ? document.all.newcustomlayer_drag : document.getElementById("newcustomlayer_drag"); 
}





function opendivwindow22(filename,headtitle,wid,hei) 
{
	document.getElementById('newcustomlayer2').style.height=hei;
	document.getElementById('newcustomlayer2').style.width=wid;
	document.getElementById('newcustomlayer2').style.display='';
	
	document.getElementById('titleBar').innerText=headtitle;
	document.getElementById('newcustomlayer2').style.top = getScrollXY();
	document.getElementById('customfrm2_drag').src = filename;	
	document.getElementById('customfrm2_drag').height = hei-50;	
	//whichDog=isIE ? document.all.newcustomlayer_drag : document.getElementById("newcustomlayer2"); 
}


function closecustomwin2()
{
	document.getElementById('newcustomlayer_drag').style.display='none';
}


function closecustomwin22()
{
	document.getElementById('newcustomlayer2').style.display='none';
}


function closecustomwin2_old()
{
	document.getElementById('newcustomlayer2').style.display='none';
}



maxLength=1000;


function initCount(ident,displayId){ // initial setting of display
  taObj=document.getElementById(ident);
  dispObj=document.getElementById(displayId);
  dispObj.innerHTML=maxLength-taObj.value.length;
}
function taLimit(ident){
  if (!document.all){return;} // allow backspace key in FireFox
  taObj=document.getElementById(ident);
  if (taObj.value.length==maxLength) {return false;}
}
function taCount(ident,displayId){
  if (taObj.value.length>maxLength){
      taObj.value=taObj.value.substring(0,maxLength);}
  dispObj.innerHTML=maxLength-taObj.value.length;
}







// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

isHot=false;

function ddInit(e){

//  topDog=isIE ? "BODY" : "HTML";
  
   
  hotDog=isIE ? event.srcElement : e.target;  
//window.status = hotDog.id;
 /* while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
 */

  if (hotDog.id=="titleBar"||hotDog.id=="titleBar1"||hotDog.id=="titleBar2"){

	offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled = true;
    document.onmousemove=dd;

  }
}

function dd(e){
  if (!ddEnabled) return;

  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

//document.onmousedown=ddInit;
//document.onmouseup=Function("ddEnabled=false");



