/* IMAGE ROLLOVER */
function preloadImages() {
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			(new Image()).src = preloadImages.arguments[i];
		}
	}
}

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }

/* DHTML FUNCTIONS */
var isNav4, isIE4, isNav6 = false;
var range = "";
var styleObj = "";

if (navigator.appVersion.charAt(0) >= 4) {
	if (navigator.appName == "Netscape") {
		if (navigator.appVersion.charAt(0) >= 5) {
			isNav6 = true;
		}
		else {
			isNav4 = true;
		}
	}
	else {
		isIE4 = true;
		range = "all.";
		styleObj = ".style";
	}
}

function getObject(obj) {
	var theObj;
	if (typeof obj == "string") {
		if (isNav6) {
			theObj = document.getElementById(obj);
			if (theObj != null) theObj = theObj.style;
		}
		else {
			theObj = eval("document." + range + obj);
			if (theObj != null) theObj = eval("theObj" + styleObj);
		}
	}
	else {
		theObj = obj;
	}
	return theObj;
}

function show() {
	var theObj;
	for (var i = 0; i < show.arguments.length; i++) {
		theObj = getObject(show.arguments[i]);
		if (theObj != null) {
			theObj.display = "block";
			theObj.visibility = "visible";
		}
	}
}

function hide() {
	var theObj;
	for (var i = 0; i < hide.arguments.length; i++) {
		theObj = getObject(hide.arguments[i]);
		if (theObj != null) {
			theObj.display = "none";
			theObj.visibility = "hidden";
		}
	}
}

function addfav(locationUrl,locationName)
{
	if (document.all)
	{
		window.external.AddFavorite(locationUrl,locationName)
	}
}



/* ADDED on 10/10/07 */


function play(vidbox, target, url, time, title, kilos){
	document.getElementById(''+target+'').innerHTML= '<div class="vshell-01"><\/div><div class="vshell-02"><\/div><div class="vshell-03"><\/div><div class="vshell-04"><\/div><div class="vshell-05"><\/div><div class="vshell-06"><\/div><div class="vshell-07"><object id="Player"  width="250" height="232" name="Player" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"><param name="uiMode" value="full"><param name="autoStart" VALUE="true"><param name="URL" value="'+url+'"><\/object><\/div><div class="vshell-08"><\/div><div class="vshell-09"><div class="btnClose"><a href="javascript:  hide(\''+vidbox+'\'); clearVids(\''+target+'\');"><img src="/library/media/1033/business/images/peopleready/images/icon_close_vid.gif" width="11" height="11" alt="" border="0"\/><\/a><\/div><div class="videoTitle">'+title+'<\/div><div class="videoDesc">'+kilos+'<\/div></div><div class="vshell-10"><\/div><div class="vshell-11"><\/div><div class="vshell-12"><\/div><div class="vshell-13"><\/div><div class="vshell-14"><\/div><div class="vshell-15"><\/div><div class="vshell-16"><div class="videoTime">Run time: '+time+'<\/div><\/div><div class="vshell-17"><\/div><div class="vshell-18"><\/div><div class="vshell-19"><\/div><\/div>';

}

function playBigger(vidbox, target, url, time, title, kilos){
	document.getElementById(''+target+'').innerHTML= '<div class="biggerVshell-01"><\/div><div class="biggerVshell-02"><\/div><div class="biggerVshell-03"><\/div><div class="biggerVshell-04"><\/div><div class="biggerVshell-05"><\/div><div class="biggerVshell-06"><\/div><div class="biggerVshell-07"><object id="Player"  width="640" height="500" name="Player" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"><param name="uiMode" value="full"><param name="autoStart" VALUE="true"><param name="URL" value="'+url+'"><\/object><\/div><div class="biggerVshell-08"><\/div><div class="biggerVshell-09"><div class="btnClose"><a href="javascript:  hide(\''+vidbox+'\'); clearVids(\''+target+'\');"><img src="/library/media/1033/business/images/peopleready/images/icon_close_vid.gif" width="11" height="11" alt="" border="0"\/><\/a><\/div><div class="videoTitle">'+title+'<\/div><div class="videoDesc">'+kilos+'<\/div></div><div class="biggerVshell-10"><\/div><div class="biggerVshell-11"><\/div><div class="biggerVshell-12"><\/div><div class="biggerVshell-13"><\/div><div class="biggerVshell-14"><\/div><div class="biggerVshell-15"><\/div><div class="biggerVshell-16"><div class="videoTime">Run time: '+time+'<\/div><\/div><div class="biggerVshell-17"><\/div><div class="biggerVshell-18"><\/div><div class="biggerVshell-19"><\/div><\/div>';

}




function positionVid(linkID, vidBox){
		mavGetObjectPosition(linkID);
		document.getElementById(''+vidBox+'').style.top = eval(yPos-200)+"px";				 
}

function clearVids(vidTarget){

	document.getElementById(''+vidTarget+'').innerHTML = '0';
}


function setSize(){
	vidDivHeight = document.getElementById('container').scrollHeight;
	
	if (window.innerWidth) {
		vidDivWidth = window.innerWidth;
	}
	else {
		vidDivWidth = document.body.clientWidth;
	}
	theTop = document.body.scrollTop
	
	document.getElementById('vidBox01').style.height = eval(vidDivHeight+400)+"px";
	document.getElementById('vidBox01').style.width = vidDivWidth+"px";	
	
	/*document.getElementById('videoContainer01').style.top = eval(theTop+300)+"px";*/
	
    if (document.getElementById("videoContainer01") != null) { 
        document.getElementById('videoContainer01').style.top = eval(theTop+300)+"px"; 
        }
    if (document.getElementById("videoContainer02") != null) { 
        document.getElementById('videoContainer02').style.top = eval(theTop+300)+"px"; 
        }
    if (document.getElementById("videoContainer03") != null) { 
        document.getElementById('videoContainer03').style.top = eval(theTop+300)+"px"; 
        }	
    if (document.getElementById("videoContainer04") != null) { 
        document.getElementById('videoContainer04').style.top = eval(theTop+300)+"px"; 
        }
    if (document.getElementById("videoContainer05") != null) { 
        document.getElementById('videoContainer05').style.top = eval(theTop+300)+"px"; 
        }	
    if (document.getElementById("videoContainer06") != null) { 
        document.getElementById('videoContainer06').style.top = eval(theTop+300)+"px"; 
        }
    if (document.getElementById("videoContainer07") != null) { 
        document.getElementById('videoContainer07').style.top = eval(theTop+300)+"px"; 
        }	
}


function checkFirstThenSize(){
	if (document.getElementById('vidBox01')) {
		setSize();		
	}
}

