
function setDivData(divName, data){
	var myReference = getDiv(divName).childNodes[0];
	myReference.data = data;
}
function getDiv(divID) {
  	oDoc = document;
    if( document.layers ) {
        if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
            //repeatedly run through all child layers
            for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
                //on success, return that layer, else return nothing
                y = getDiv(divID,oDoc.layers[x].document); }
            return y; } }
    if( document.getElementById ) {
        return document.getElementById(divID); }
    if( document.all ) {
        return document.all[divID]; }
    return false;
}
function setClass(id, className) {
	var currentClassName = getDiv(id).className;
	if (currentClassName != className){
		getDiv(id).className = className; 
	}
}
function showDiv(divName, status) {
    //get a reference as above ...
    var myReference = getDiv(divName);
    if( !myReference ) {
        return false; //don't go any further
        //return anything would work,
        //but I am using false to show failure
    }
    //now we have a reference to it
    if( myReference.style ) { //DOM & proprietary DOM
		status = (status) ? 'visible' : 'hidden';
        myReference.style.visibility = status;
    } else {
        if( myReference.visibility ) { //Netscape
			status = (status) ? 'show' : 'hide';
            myReference.visibility = status;
        } else {
            return false; //don't go any further
        }
    }
    return true;
}

// --- Simple DHTML Abstraction END --->
function hideAllDiv() {
	var formDivs = new Array("rightLowerFormDefault","rightLowerFormOne","rightLowerFormTwo","rightLowerFormThree","rightLowerFormFour");
	for (var i=0; i<formDivs.length;i++){
		divName = formDivs[i];
		div = getDiv(divName);
		div.style.visibility = 'hidden';
	}
}
function stackDivs(sourceDivs, targetDiv){
	var targetTop = getDiv(targetDiv).style.top;
	var targetLeft = getDiv(targetDiv).style.left;
	for (var i=0; i<sourceDivs.length;i++){
		divName = sourceDivs[i];
		div = getDiv(divName);
		div.style.visibility = "hidden";
		div.style.top = targetTop;
		div.style.left = targetLeft;
	}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function photo_gl() {
//	window.open("/whats_new/photo_gallery/photo_gallery.html", "portal", "width=350,height=375,left=" + ((screen.width - 760) / 2) + ",top=" + ((screen.height - 420) / 2 - 40) + ",resizable=0,scrollbars=0,status=0").focus();
	document.location = "gallery/gallery_page.php";
}

function faq() {
	window.open("products/faq/faq.html", "portal", "width=350,height=375,left=" + ((screen.width - 760) / 2) + ",top=" + ((screen.height - 420) / 2 - 40) + ",resizable=0,scrollbars=0,status=0").focus();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function hatchFaq() {
	window.open("faq.html", "portal", "width=350,height=375,left=" + ((screen.width - 760) / 2) + ",top=" + ((screen.height - 420) / 2 - 40) + ",resizable=0,scrollbars=0,status=0").focus();
}

function openWindow(windowPath, windowName) {
	window.open(windowPath, windowName, "width=350,height=375,left=" + ((screen.width - 760) / 2) + ",top=" + ((screen.height - 420) / 2 - 40) + ",resizable=0,scrollbars=0,status=0").focus();
}

function setImageSrc(id,src){
	getDiv(id).src = src;
}

