function Bstatus(args, status) {
	MyTD = document.getElementById("B"+args)
	if (status) { 
		MyTD.className = "menuB_over"
	} else {
		MyTD.className = "menuB_out"
	}
}

function openGallery(myType) {
	newwindow=window.open("ImgAlbumView.aspx?type="+myType, "myWindow", "status = 1, menubar=0, height = 600, width = 800, resizable = 0" )
if (window.focus) {newwindow.focus()}
return false;
}

function getFile(args) {
    var fileEx = args.substring(args.length-3, args.length);
    switch (fileEx.toLowerCase()) {
        case "avi":
            var videoWindow = window.open("VideoPlayer.aspx?fn=" + args.toString() , "vWindow", "status = 1, menubar=0, height = 510, width = 550, resizable = 0" )
            if (window.focus) { videoWindow.focus(); }
            break;
        case "ppt":
            window.location = args.toString();
            break;
        case "doc":
            window.location = args.toString();
            break;
        case "jpg":
            imageWindow = window.open("ImagePlayer.aspx?fn=" + args.toString() , "iWindow", "status = 1, menubar=0, height = 600, width = 700, resizable = 0, top=20, left=20" )
            if (window.focus) { imageWindow.focus(); }
            break;
        case "gif":
            imageWindow = window.open("ImagePlayer.aspx?fn=" + args.toString() , "iWindow", "status = 1, menubar=0, height = 600, width = 700, resizable = 0" )
            if (window.focus) { imageWindow.focus(); }
            break;
           default:
           alert("Undefined File Extension")
           break
    }
}

//--------------------------------------------------
function ReSize(args) {
    var ContentDiv, BGDiv, DataDiv
    ContentDiv = document.getElementById(args)
    BGDiv = document.getElementById(args + "BG")
    DataDiv = document.getElementById(args + "Data")
    BGDiv.style.height = DataDiv.offsetHeight-40;
    BGDiv.style.width = DataDiv.offsetWidth-40;
    ContentDiv.style.height = DataDiv.offsetHeight;
}
//--------------------------------------------------
function ObsTo(args, State) {
    myID = args.id.toString()
    ParentID = myID.substr(0, Number(myID.length-4))
    bgID = ParentID + "BG"
    bgOBJ = document.getElementById(bgID);
    args.className = "cnt" + State.toString();
    bgOBJ.className = "bg" + State.toString();
   
}
//--------------------------------------------------
function LoadPhoto(newPath) {
    var myDiv = document.getElementById('PhotoPlayerDiv');
    var myPlayer = document.getElementById('PhotoPlayerImage');
    myDiv.className = 'PhotoVisible';
    myPlayer.src = newPath;
    window.scroll(0,0);
}

function unLoadPhoto() {
    var myDiv = document.getElementById('PhotoPlayerDiv');
    var myPlayer = document.getElementById('PhotoPlayerImage');
    myPlayer.src = ""
    myDiv.className = 'PhotoInvisible';
    //window.scroll(0,0);
}
//--------------------------------------------------
function LoadVideo(newPath) {
    var so = new SWFObject(newPath, "VideoPlayer", "600", "400", "7", "");
    so.write("VideoPleyerDiv");
    var myDiv = document.getElementById('PhotoPlayerDiv');
    //var myPlayer = document.getElementById('PhotoPlayerImage');
    myDiv.className = 'PhotoVisible';
    window.scroll(0,0); 
}

function unLoadVideo() {
    var myDiv = document.getElementById('PhotoPlayerDiv');
    var myPlayer = document.getElementById('VideoPleyerDiv');
    //var myPlayer = document.getElementById('PhotoPlayerImage');
    myDiv.className = 'PhotoInvisible';
    //myPlayer.src = ""
    myPlayer.innerHTML = "";
    //window.scroll(0,0);
}
//=============================================================================================
function TechnoDivObj(argsObj)
{
  var arg;
  this.div = null;
  this.classMain = "TechnoDiv";
  this.classContent = "TechnoDivContent";
  this.classContentLive = "TechnoDivContentLive"
  this.classBGLive = "TechnoDivBGLive";
  //-
  for (arg in argsObj) {
    this[arg] = argsObj[arg];
  }
  this.REclassMain = new RegExp('\\b' + this.classMain + '\\b', 'gi');
  //-
  if (this.div) {
    this.init(this.div);
    this.div = null;
  }
}
//--------------------------------------------------
TechnoDivObj.prototype.init = function(e)
{
  var BG_Div;
  //-
  if (!document.getElementsByTagName) { return false; }
  //-
  BG_Div = document.createElement("div");
  BG_Div.className = this.classBGLive;
  BG_Div.style.width = e.offsetWidth;
  //-
  childNodes = e.childNodes;
  for(i=0; i < childNodes.length; i++) {
    if(childNodes[i].className && childNodes[i].className.match(this.classContent)) {
        childNodes[i].className = this.classContentLive;
        BG_Div.style.height = childNodes[i].offsetHeight;
        e.insertBefore(BG_Div, childNodes[i]);
        e.style.height = BG_Div.offsetHeight;
        e.style.width = BG_Div.offsetWidth;
        break;
    }
  }
  //-
  return this;
};
//--------------------------------------------------
function TechnoDivAutomatic(Args)
{
  var tempObj, divs, i;
  if (!Args) { Args = {}; }
  tempObj = new TechnoDivObj(Args);
  divs = document.getElementsByTagName("div");
  for (i=0; i < divs.length; i++) {
    if (divs[i].className && divs[i].className.match(tempObj.REclassMain)) {
      Args.div = divs[i];
      divs[i].tabber = new TechnoDivObj(Args);
    }
  }
  return this;
}
//--------------------------------------------------
function TechnoDivAutomaticOnLoad(Args)
{
  var oldOnLoad;
  if (!Args) { Args = {}; }
  oldOnLoad = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = function() {
        TechnoDivAutomatic(Args);
    };
  } else {
    window.onload = function() {
      oldOnLoad();
      TechnoDivAutomatic(Args);
    };
  }
}
//--------------------------------------------------
if (typeof TechnoDivOptions == 'undefined') {
    TechnoDivAutomaticOnLoad();
} else {
  if (!TechnoDivOptions['manualStartup']) {
    TechnoDivAutomaticOnLoad(TechnoDivOptions);
  }
}