﻿var curVidDiv = "";

function getMovie(movieName) {
    if (window[movieName]){
        return window[movieName];
    } else {
        return document[movieName];
    }
}

function getObject(objectID){
	if (document.all!=null){
		return document.all[objectID];
	} else if (document.getElementById){
		return document.getElementById(objectID);
	}
}

var bioName = "gail";

function showDIV(divID, _bioName){
	bioName = _bioName;
	var divPop = getObject(divID);
	divPop.style.display = "block";
	writePopupSWF();
}

function showVideoDiv(divName) {
    /*
    for(var x = 1; x <= totalNum; x++){
        var thisDiv = getObject("video" + x);
        thisDiv.style.display = (x == targetNum) ? "block" : "none";
    }
    */

    if(curVidDiv != "") getObject(curVidDiv).style.display = "none";
    getObject(divName).style.display = "block";
    curVidDiv = divName;
}

function hideDIV(divID){
	var divPop = getObject(divID);
	divPop.style.display = "none";
}

function getBioName(){
	return bioName;
}

function writePopupSWF(){
	var so2 = new SWFObject("/flash/bio_popup.swf", "bio_popup", "369", "424", "9", "");
	so2.addParam("scale", "noscale");
	so2.addParam("wmode", "transparent");
	so2.addParam("allowScriptAccess", "sameDomain");
	so2.write("flashcontent2");
}