


function gotourl(url,type,currentwin)

{        switch (type)

        {        case "1":

                {       etarget = eval(currentwin)

                        etarget.location=url

                        break;

                }

                case "2":

                {        target = currentwin + ".frames('content')";

                        etarget = eval(target)

                        etarget.location=url;

                        break;

                }

                case "3":

                {       new_window=window.open(url,"","toolbar=yes,location=yes,directories=yes,status,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes");

                        break;

                }

                case "4":

                {       mytop=screen.height/2-275;
                new_window=window.open(url,"","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=yes,width=700,height=550,top="+mytop+",scrollbars=yes");

                        break;

                }

                case "5":

                {       new_window=window.open(url,"Tarifs","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes");

                        break;

                }

                case "6":

                {       new_window=window.open(url,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width=600,height=363");

                        break;

                }

                default:

                {       etarget = eval(currentwin)

                        etarget.location=url

                        break;

                }

        }

}



//images

function setimage(id,src)

{        etarget = eval(id);

        etarget.src=src;

}



//color, class, show, hide, ...

function setnewclassauto(strclass)

{       var ns6=document.getElementById&&!document.all;

        var etarget=ns6?e.target:event.srcElement;

        setnewclass(strclass,etarget)

}



function setnewclassobj(strobj,strclass)

{        obj=eval(strobj)

         obj.className=strclass;

}



function setnewclass(strclass,obj)

{        obj.className=strclass;

}





function show(obj)

{        obj.visibility = "visible"

}



function hide(obj)

{        obj.visibility = "hidden"

}



function display(obj)

{        obj.display = ""

}



function nodisplay(obj)

{        obj.display = "none"

}



function setcheckvalue()

{        var ns6=document.getElementById&&!document.all;

        var etarget=ns6?e.target:event.srcElement;

        if (etarget.value==1)

                etarget.value=0;

        else

                etarget.value=1;

}





function showid(id)

{        target = id+".style";

        etarget = eval(target)

        show(etarget);

}



function hideid(id)

{        target = id+".style";

        etarget = eval(target)

        hide(etarget);

}



function chgColor(rowNum,Color)

{        thisRow=eval(docObj+'ligne'+rowNum);

        OldColor=thisRow.bgColor;

        OldBorderColor=thisRow.borderColor;

        thisRow.bgColor= Color;

        thisRow.borderColor=Color;

}

function retColor(rowNum)

{        thisRow=eval(docObj+'ligne'+rowNum);

        thisRow.bgColor=OldColor;

        thisRow.borderColor=OldBorderColor;

}



//history

function back(nbre,currentwin)

{        etarget = eval(currentwin)

         etarget.history.go(nbre);

}



//checkbox

function setcheck(valtrue,valfalse)

{       var ns6=document.getElementById&&!document.all;

        var etarget=ns6?e.target:event.srcElement;

        if (etarget.value==valtrue)

            etarget.value=valfalse

        else

            etarget.value=valtrue

}



function resetvalcheck()

{       var ns6=document.getElementById&&!document.all;

        var etarget=ns6?e.target:event.srcElement;

        if (etarget.checked)

            etarget.checked=false

        else

            etarget.checked=true

}

function apercu(image,titre){ 
	var screenWidth=screen.width-20;
	var screenHeight=screen.height;
	var newWidth=700; 
	var newHeight=500;
	var positionLeft=(screenWidth-newWidth)/2;
	var positionTop=(screenHeight-newHeight)/2.5;
	url="./websurf/showimage.php?image="+image+"&titre="+titre;	new_window=window.open(url,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=700,height=500,top=3000,left=3000");	
	new_window.focus();
	for(i = 1 ; i < positionLeft ; i = i + 8)
		new_window.moveTo(i,positionTop)
}

function setControlColorGotFocus(field){
	field.style.backgroundColor="transparent";
	field.style.borderColor="#FFFFFF";
	field.style.color="#FFFFFF";

}

function setControlColorLostFocus(field){
	field.style.backgroundColor="#FFFFFF";
	field.style.borderColor="#1F296E";
	field.style.color="#1F296E";
}

