function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}


var fadeimages=new Array()
fadeimages[0]=["_common/templates/default/images/pic-0.jpg", "", ""]
fadeimages[1]=["_common/templates/default/images/pic-1.jpg", "", ""]
fadeimages[2]=["_common/templates/default/images/pic-2.jpg", "", ""]

var faded_pic_width = "548"
var faded_pic_height = "438"
var fadebgcolor="transparent"

function mga_body_onload()
{
/*
 vscroller_init('featured'); //init the vertical scroller
 //init the content vertical scrollbar
 myScrollbar1 = new MyScrollBar( 'myScrollbar1', 'myScrollBar1TD', 'content_div', 'scrollup', 'scrolldown' );
 */
}

function popups( addr )
{
   window.open( addr , '',
   "status=no,toolbar=no,menubar=no,personalbar=no,width=400,height=400,left=20,top=40" +
                  ",scrollbars=no,resizable=no");
}

function cssGetValue( str )
{
  return new Number (str.replace('px', ''));
}

var debug_window;
function debug_write( msg ) {
if ( !debug_window)
 debug_window = window.open('','',"status=no,toolbar=no,menubar=no" +
                                  ",personalbar=no,width=600,height=760,left=20,top=40" +
                                  ",scrollbars=yes,resizable=yes");
debug_window.document.write( msg + '</br>');
}


function popup( adr, w, h ) {
    var dlg = window.open( adr, "send_mail",
                  "toolbar=no,menubar=no,personalbar=no,width="+w+",height="+h+",left=40,top=120" +
                  "scrollbars=no,resizable=no");
}

// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this 
// notice with the code.
var resetRolls = new Object();

function resetimage(src)
{
this.src=src;
this.confirm=true;
this.alt="Reset";
this.write=resetimage_write;
}

function resetimage_write()
{
document.write('<a ');
if (this.rollover)
    {
    if (! this.name)
        {
        alert('to create a rollover you must give the image a name');
        return;
        }

    resetRolls[this.name] = new Object();
    resetRolls[this.name].over = new Image();
    resetRolls[this.name].over.src=this.rollover;
    resetRolls[this.name].out = new Image();
    resetRolls[this.name].out.src=this.src;
    document.write(
        ' onMouseOver="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].over.src"' + 
        ' onMouseOut="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].out.src"'
        );
    }
document.write(' href="javascript:');
if (this.confirm)
    document.write('if(confirm(\'Stergeti continutul formularului?\'))');
document.write(
    'document.forms[' + 
    (document.forms.length - 1) + '].reset();void(0);">');
document.write('<img src="' + this.src + '" alt="' + this.alt + '"');
document.write(' border=0');
if (this.name)document.write(' name="' + this.name + '"');
if (this.height)document.write(' height=' + this.height);
if (this.width)document.write(' width=' + this.width);
if (this.otheratts)document.write(' '+ this.otheratts);
document.write(' /></a>');
}
// Cross Browser DOM
// copyright Stephen Chapman, 4th Jan 2005
// you may copy this code but please keep the copyright notice as well
var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM = document.getElementById;
if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1; else {
var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)
&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}
function xDOM(objectId, wS) {
if (stdDOM) return wS ? document.getElementById(objectId).style:
document.getElementById(objectId);
if (ieDOM) return wS ? document.all[objectId].style: document.all[objectId];
if (nsDOM) return document.layers[objectId];
}

// More Object Functions
// copyright Stephen Chapman, 18th Jan 2005
// you may copy these functions but please keep the copyright notice as well
function setObjVis(objectID,vis) {var objs = xDOM(objectID,1); objs.visibility = vis;}
function toggleObjVis(objectID) {var objs = xDOM(objectID,1); var vis = objs.visibility; objs.visibility = (vis == "visible" || vis == "show") ? 'hidden' : 'visible'}
function moveObjTo(objectID,x,y) {var objs = xDOM(objectID,1); objs.left = x; objs.top = y;}
function moveObjBy(objectID,x,y) {var obj = xDOM(objectID,0);var objs = xDOM(objectID,1); if (obj.offsetLeft != null) {var l = obj.offsetLeft; var t = obj.offsetTop; objs.left = l+x; objs.top = t+y;} else if (objs.pixelLeft != null) {objs.pixelLeft += x; objs.pixelTop += y;} else obj.moveBy(x,y);}
function moveObjLayer(objectID,z) {var objs = xDOM(objectID,1); objs.zIndex = z;}

// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
function pageWidth() {return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;}
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;}
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement && document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;}
function posTop() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement && document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}
function posRight() {return posLeft()+pageWidth();}
function posBottom() {return posTop()+pageHeight();}

