// JavaScript Document

// 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";
  //whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
  document.all.theLayer ;
  
  whichDog2=document.all.theLayer2;  
//  hotDog=isIE ? event.srcElement : e.target;  
//  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
//    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
//  }  
//  if (hotDog.id=="titleBar"){
//    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;
//  }
}

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

//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(layer){
//alert(layer);
document.getElementById(layer).style.display="none";
}

function showMe(layer){
//alert(layer);
document.getElementById(layer).style.display="block";
}

function switchimage(img){
//alert(document.getElementById(img).src);
if(document.getElementById(img).src=="/Images/scrollHaut.gif")
    document.getElementById(img).src="/Images/scrollBas.gif";
else
    document.getElementById(img).src="/Images/scrollHaut.gif";    
}

function switchDisplay(layer){
if(document.getElementById(layer).style.display == "block")
    document.getElementById(layer).style.display = "none";
else{
     document.getElementById(layer).style.display = "block";
     document.getElementById("theLayer2").style.display = "block";}
}

function hideMe2(){
  if (isIE||isNN) whichDog2.style.display="none";
  else if (isN4) document.theLayer2.visibility="hide";
}

function showMe2(){
  document.all.theLayer2.style.display="block";
}

function changeStatus(btnid){
       
       if (document.getElementById(btnid).style.display == "block")
         document.getElementById(btnid).style.display = "none";
       else
         document.getElementById(btnid).style.display = "block";
      
      }
function enable(btnid){
       document.getElementById(btnid).disabled=false;
      }
function focusMe(elem){
       document.getElementById(elem).focus();
}
//function showDetails(comment){
//    alert("Showdetails");
//    alert("document.all.theLayer"+document.all.theLayer);
//    
//    if (comment.length < 1)
//    return
//  document.getElementById('theLayer').style.display="block";
//  
//  document.getElementById('tbComment').value = comment;
////}
/*function clear()
{
	if( document.all.tbDecisionVariable != null )
	{
		//document.getElementsByName('tbDecisionVariable').value="";
		document.all.tbDecisionVariable.value="";
		//document.all.ddlCondition.value=0;
		document.all.tbDecisionValeur.value = "";
		document.all.tbDecisionLabel.value="";
	}
	if( document.all.tbLabelName != null )
	{
		document.all.tbLabelName.value = "";
		document.all.tbLabelSection.value = "";
	}
	if( document.all.tbmakeCallNumber != null )
	{
		document.all.tbmakeCallNumber.value = "";
		document.all.tbmakeCallState.value = "";
		document.all.tbmakeCallVariable.value = "";
	}
	if( document.all.tbNbDiffusion != null )
	{
		document.all.tbNbDiffusion.value = "1";
		document.all.tbNbDigits.value = "4";
		document.all.tbDigitsEnd.value = "";
		document.all.tbFirstDigitWait.value = "";
		document.all.tbNextDigitWait.value = "";
		document.all.tbDtmfVariable.value = "";
		document.all.tbDiffusionVariable.value = "";
	}
	if( document.all.tbMaxLength != null )
	{
		document.all.tbMaxLength.value = "0";
		document.all.tbNotifAddress.value = "";
		document.all.tbNotifText.value = "";
		document.all.tbDtmfCRestart.value = "";
		document.all.tbDtmfCDelete.value = "";
		document.all.tbDtmfCPlay.value = "";
		document.all.tbDtmfCVariable.value = "";
		document.all.tbEnregistrementVariable.value = "";
	}
	if( document.all.tbOverflowNumber != null )
	{
		document.all.tbOverflowNumber.value = "";
		document.all.tbOverflowTemporisation.value = "0";
		document.all.tbACDNbQueue.value = "0";
		document.all.tbCNTempo.value = "0";
	}
	if( document.all.tbServerName != null )
	{
		document.all.tbServerName.value = "";
		document.all.tbServerPort.value = "";
		document.all.tbMessageName.value = "";
		document.all.tbMessageContent.value = "";
	}
	/*
	document.all..value = "";
	document.all..value = "";
	document.all..value = "";
	document.all..value = "";
	document.all..value = "";
}*/





