/*
var oldonload=window.onload;
if(typeof(oldonload)=='function')
window.onload=function(){oldonload();AddCss();};
else window.onload=function(){AddCss();};
*/
function vidCss() {
	var ver=getIEVersion();
	var box = document.getElementById('vidbox');
	if (ver != -1 && ver < 7.0){
		var l=CreateEl("link");
		l.setAttribute("type","text/css");
		l.setAttribute("rel","stylesheet");
		l.setAttribute("href","http://webpagemodels.com/css/right-fixed-IE.css");
		l.setAttribute("media","screen");
		document.getElementsByTagName("head")[0].appendChild(l);
		box.style.position="absolute";
	}
	else {
		var l=CreateEl("link");
		l.setAttribute("type","text/css");
		l.setAttribute("rel","stylesheet");
		l.setAttribute("href","http://webpagemodels.com/css/right-fixed.css");
		l.setAttribute("media","screen");
		document.getElementsByTagName("head")[0].appendChild(l);
		box.style.position="fixed";
	}
}
function getIEVersion() {
	var rv = -1; // Return value assumes failure.
	if (navigator.appName == 'Microsoft Internet Explorer') {
		var ua = navigator.userAgent;
		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		if (re.exec(ua) != null) {
			rv = parseFloat(RegExp.$1);
		}
	}
	return rv;
}
function CreateEl(x){
	return(document.createElement(x));
}
function embedMovie($name){	//included for compatabiliy purposes
	vidCss();
	loadmovie($name);
}
function firstLoad(name,width,height) {	 //included for compatabiliy purposes
		embedMovie(name,width,height);
}
function loadmovie(name,width,height) {	 //included for compatabiliy purposes
	var url = 'rtmp://72.35.95.20/ibiz/'+name;
	//var url = 'http://ibiz.flv6.com/movies/'+name;
	var box = document.getElementById('vidbox');
	box.style.zIndex = 99;
	width = '348';
	height = '291';
	var	obj  = ''
		obj += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '
		obj += 'width="'+width+'" ';
		obj += 'height="'+height+'" ';
		obj += 'title="Model Preview">';
		obj += '<param name="movie" value="http://webpagemodels.com/inc/flvplayer2.swf" />'
		obj += '<param name="quality" value="high" />';
		obj += '<param name="salign" value="TL" />';
		obj += '<param name="scale" value="noScale" />';
		obj += '<param name=wmode value=transparent>';
		obj += '<param name="FlashVars" value="path='+url+'" />';
		
		obj += '<embed src="http://webpagemodels.com/inc/flvplayer2.swf" ';
		obj += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';
		obj += 'width="'+width+'" ';
		obj += 'height="'+height+'"';
		obj += 'salign="TL" ';
		obj += 'scale="noScale" ';
		obj += 'wmode="transparent" ';
		obj += 'FlashVars="path='+url+'"';
		obj += '></embed>';
		obj += '</object>';
	box.innerHTML = obj;
}
function thisObject(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		//return window[movieName];
		return document[movieName];
	} else {
		return document[movieName];
	}
}
function show(url) {
	var box = document.getElementById('vidbox');
	box.style.zIndex = 99;
	thisObject("flashObject").vid(url);
}
function hideVid(){} //to ensure compatibility with newer version of the player
function closeVid() {
	var box = document.getElementById('vidbox');
	box.style.zIndex = -1;
}
function closeMovie() {
	var box = document.getElementById('vidbox');
	box.style.zIndex = -1;
	box.innerHTML = '';
}