
window.onresize = doResize;

function doResize()  //Scroll bar reset funtion for window resize event.
{
	var mydiv = document.getElementById("contentBody");
	var inheritedstyle = document.defaultView.getComputedStyle(mydiv, "");
	var scrollBodyHeight = inheritedstyle.height;
	//	window.alert(scrollBodyHeight);
	document.getElementById("mycustomscroll-flexcroll-vscroller").style.height = scrollBodyHeight; 
	document.getElementById("mycustomscroll").style.height=scrollBodyHeight;
	fleXenv.updateScrollBars();
}

function iframeNavigate(thestring){
    
    var iframe = document.getElementById('mainBody');

	iframe.src = thestring;

}  

function changeDivImage()
{
	var imgPath = new String();
	imgPath = document.getElementById("tmas").style.backgroundImage;
	document.getElementById("tmas").style.backgroundImage = "url(images/trailerTeaser.png)";
}

function changeDivImageBack()
{
	var imgPath = new String();
	imgPath = document.getElementById("tmas").style.backgroundImage;
	document.getElementById("tmas").style.backgroundImage = "url(images/TMAS-title-font_blur_PodcastAvailableNow.png)";
}

function taghover(img_name,img_src) {
	var imgPath = new String();
	imgPath = document.getElementById("tmas").style.backgroundImage;
	document.getElementById("tmas").style.backgroundImage = 'url('+img_src+')';
//	document[img_name].img_src;
}

Spry.Utils.addLoadListener(function() {
	Spry.$$("#deadgirl").addEventListener('mouseover', function(e){ taghover('centerbox','test.png') }, false);
	Spry.$$("#deadgirl").addEventListener('mouseout', function(e){ taghover('centerbox','TMAS-title-font_45b.png') }, false);
});





/***********************************************
* START Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}
//Sample usages
//disableSelection(document.body) //Disable text selection on entire body
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"

/*END Disable Text Selection script- Dynamic Drive HTML code library (www.dynamicdrive.com) */





/************************************************
* START hesido.com Image Rollover Script
* http://www.hesido.com/web.php?page=imageswapping
************************************************/
//If the browser is W3 DOM compliant, execute setImageSwaps function
if (document.getElementsByTagName && document.getElementById) {
if (window.addEventListener) window.addEventListener('load', setImageSwaps, false);
else if (window.attachEvent) window.attachEvent('onload', setImageSwaps);
}

//When document loads, apply the prepareImageSwap function to various images with our desired settings
function setImageSwaps() {
//Mousedown, restore - for images in container with ID=VineFrame
prepareImageSwap('VineFrame',true,true,true,true,false,false);
//Hover with restore, most basic usage - for any image in document.body that are not yet processed (function accepts elements,too)
prepareImageSwap(document.body);
//Note that once an image is processed, it won't be processed again, so you should set more specific images first, e.g. document.body, as it is the grand
//container, has to be processed last.
}


//The following is the function that do the actual job

function prepareImageSwap(elem,mouseOver,mouseOutRestore,mouseDown,mouseUpRestore,mouseOut,mouseUp) {
//Do not delete these comments.
//Non-Obtrusive Image Swap Script by Hesido.com
//V1.1
//Attribution required on all accounts
	if (typeof(elem) == 'string') elem = document.getElementById(elem);
	if (elem == null) return;
	var regg = /(.*)(_nm\.)([^\.]{3,4})$/
	var prel = new Array(), img, imgList, imgsrc, mtchd;
	imgList = elem.getElementsByTagName('img');

	for (var i=0; img = imgList[i]; i++) {
		if (!img.rolloverSet && img.src.match(regg)) {
			mtchd = img.src.match(regg);
			img.hoverSRC = mtchd[1]+'_hv.'+ mtchd[3];
			img.outSRC = img.src;
			if (typeof(mouseOver) != 'undefined') {
				img.hoverSRC = (mouseOver) ? mtchd[1]+'_hv.'+ mtchd[3] : false;
				img.outSRC = (mouseOut) ? mtchd[1]+'_ou.'+ mtchd[3] : (mouseOver && mouseOutRestore) ? img.src : false;
				img.mdownSRC = (mouseDown) ? mtchd[1]+'_md.' + mtchd[3] : false;
				img.mupSRC = (mouseUp) ? mtchd[1]+'_mu.' + mtchd[3] : (mouseOver && mouseDown && mouseUpRestore) ? img.hoverSRC : (mouseDown && mouseUpRestore) ? img.src : false;
				}
			if (img.hoverSRC) {preLoadImg(img.hoverSRC); img.onmouseover = imgHoverSwap;}
			if (img.outSRC) {preLoadImg(img.outSRC); img.onmouseout = imgOutSwap;}
			if (img.mdownSRC) {preLoadImg(img.mdownSRC); img.onmousedown = imgMouseDownSwap;}
			if (img.mupSRC) {preLoadImg(img.mupSRC); img.onmouseup = imgMouseUpSwap;}
			img.rolloverSet = true;
		}
	}

	function preLoadImg(imgSrc) {
		prel[prel.length] = new Image(); prel[prel.length-1].src = imgSrc;
	}

}

function imgHoverSwap() {this.src = this.hoverSRC;}
function imgOutSwap() {this.src = this.outSRC;}
function imgMouseDownSwap() {this.src = this.mdownSRC;}
function imgMouseUpSwap() {this.src = this.mupSRC;}

/************************************************
* END hesido.com Image Rollover Script
************************************************/

