// switch display mode
function swapcolor(objet,color1,color2)
{
if (objet.bgColor==color1) objet.bgColor=color2;
else objet.bgColor=color1;
}
function reveal(id)
{
if (document.getElementById(id).style.display == "")
{
document.getElementById(id).style.display = "none";
}
else
{
document.getElementById(id).style.display = "";
}
}
// switch display mode to not displayed
function reducew(id)
{
if (document.getElementById(id).style.display == "")
{
document.getElementById(id).style.display = "none";
}
}
// switch display mode to displayed
function extendw(id)
{
document.getElementById(id).style.display = "";
}
function menuon(id)
{
document.getElementById(id).borderColor = "#000000";
}
function menuoff(id)
{
document.getElementById(id).borderColor = "#CFF3EA";
}
function printpopup(id,wdth,heght)
{
var text2print = document.getElementById(id).innerHTML ;
var newwin= window.open('','','toolbar=no, directories=no, location=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width='+wdth+',height='+heght);
newwin.document.write("
VinOfera");
newwin.document.write("
");
newwin.document.write(" "+text2print+" ");
newwin.document.write("
");
newwin.document.write("");
newwin.document.close();
}
function test_login()
{
var l2t = document.getElementById('LOGIN').value ;
var page4tst = "popup_tl.php?tstlogin="+l2t;
window.open(page4tst,'','toolbar=no, directories=no, location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=1,height=1');
}
function barmenuon(id)
{
document.getElementById(id).background = "IMG/SIMPLE/m_on.gif";
}
function barmenuoff(id)
{
document.getElementById(id).background = "IMG/SIMPLE/m_off.gif";
}
// display Update button when a record is open for edition
function DisplayUpdButton()
{
document.getElementById('saveasupdtbt').style.visibility="visible";
document.getElementById('viewbt').style.visibility="hidden";
document.getElementById('savebt').style.visibility="hidden";
}
// scroller
function verScroll(dir, spd, loop)
{
loop = true;
direction = "up";
speed = 10;
scrolltimer = null;
document.getElementById('e2').style.visible='visible' ;
document.getElementById('e2').style.visibility='visible' ;
document.getElementById('e2').style.left= ( screen.width - 400 ) / 2 ;
document.getElementById('e2').style.top= ( screen.heigth - 200 ) / 2 ;
if (document.layers)
{
var page = eval(document.elementTexte);
}
else
{
if (document.getElementById)
{
var page= eval("document.getElementById('elementTexte').style");
}
else
{
if (document.all)
{
var page = eval(document.all.elementTexte.style);
}
}
}
direction = dir;
speed = parseInt(spd);
var y_pos = parseInt(page.top);
if (y_pos<=-200) y_pos='180';
if (loop == true)
{
if (direction == "dn")
{
page.top = (y_pos - (speed));
}
else
{
if (direction == "up" && y_pos < 10)
{
page.top = (y_pos + (speed));
}
else
{
if (direction == "top")
{
page.top = 10;
}
}
}
scrolltimer = setTimeout("verScroll(direction,speed,'true')", 30);
}
}
function stopScroll() {
loop = false;
clearTimeout(scrolltimer);
}