
// FLASH 8 OBJECT/EMBED FUNCTION

function Flash8(src,idname,width,height,bg) {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + idname + '" align="top">');
document.write('<param name="movie" value="' + src + '" />');
document.write('<param name="menu" value="true" /><param name="salign" VALUE="lt" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="bgcolor" value="' + bg + '" />');
document.write('<param name="loop" value="true" />');
if(bg=="transparent"){
document.write('<param name="wmode" value="transparent" />');
} else {
document.write('<param name="bgcolor" value="' + bg + '" />');
}
document.write('<param name="allowScriptAccess" value="always" />');
document.write('<embed src="' + src + '" menu="true" quality="high" swLiveConnect="true" ');
if(bg=="transparent"){
document.write('wmode="transparent" '); 
} else {
document.write('bgcolor="'+ bg +'" '); 
}
document.write('width="' + width + '" height="' + height + '" name="' + idname + '" id="' + idname + '" align="top" loop="false" salign="lt" type="application/x-shockwave-flash" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer">');
document.write('</embed>');
document.write('</object>');
};



// RESIZE THE FLASH MOVIE FUNCTION

function resizeFlash(newHeight) {
document.getElementById('main').style.height = newHeight+"px";
document.getElementById('flashmovie').style.height = newHeight+"px";
}


// GENERATE A POPUP WINDOW FUNCTION

function popup(url,name,wide,high){

//alert(url+" "+name+" "+wide+" "+high);

// onClick="popup('url','name',wide,high);return false;"
	
	if (high=="max") 
		{ high=screen.availHeight };
	if (wide=="max")
		{ wide=screen.availWidth };
	attr="location=no,toolbar=no,menu=no,scrollbars=yes,resizable=yes,statusbar=no,width="+wide+",height="+high;
	doPopUpWindow = window.open(url,name,attr);
	doPopUpWindow.moveTo((screen.availWidth/2)-(wide/2),(screen.availHeight/2)-(high/2)-(screen.availHeight/10));
}


// HIDING ELEMENTS 

function hide(elid){
	document.getElementById(elid).style.visibility="hidden";
	document.getElementById(elid).style.display="none";
}



function showblock(elid){
	document.getElementById(elid).style.visibility="visible";
	document.getElementById(elid).style.display="block";
}



function showinline(elid){
	document.getElementById(elid).style.visibility="visible";
	document.getElementById(elid).style.display="inline";
}




function hideClass(cName){
var divs=document.getElementsByTagName('div');	
		for (i=0; i < divs.length; i++) {
			if (divs[i].className==cName){
			divs[i].style.visibility="hidden";
			divs[i].style.display="none";
			}
		}
}


// determine if the user's browser is safari

function isSafari(){
var exclude=1;
var agt=navigator.userAgent.toLowerCase();
var win=0;var mac=0;var lin=1;
if(agt.indexOf('win')!=-1){win=1;lin=0;}
if(agt.indexOf('mac')!=-1){mac=1;lin=0;}
var lnx=0;if(lin){lnx=1;}
var ice=0;
var ie=0;var ie4=0;var ie5=0;var ie6=0;var com=0;var dcm;
var op5=0;var op6=0;var op7=0;
var ns4=0;var ns6=0;var ns7=0;var mz7=0;var kde=0;var saf=0;
if(typeof navigator.vendor!="undefined" && navigator.vendor=="KDE"){
	var thisKDE=agt;
	var splitKDE=thisKDE.split("konqueror/");
	var aKDE=splitKDE[1].split("; ");
	var KDEn=parseFloat(aKDE[0]);
	if(KDEn>=2.2){
		kde=1;
		ns6=1;
		exclude=0;
		}
	}
else if(agt.indexOf('webtv')!=-1){exclude=1;}
else if(typeof window.opera!="undefined"){
	exclude=0;
	if(/opera[\/ ][5]/.test(agt)){op5=1;}
	if(/opera[\/ ][6]/.test(agt)){op6=1;}
	if(/opera[\/ ][7-9]/.test(agt)){op7=1;}
	}
else if(typeof document.all!="undefined"&&!kde){
	exclude=0;
	ie=1;
	if(typeof document.getElementById!="undefined"){
		ie5=1;
		if(agt.indexOf("msie 6")!=-1){
			ie6=1;
			dcm=document.compatMode;
			if(dcm!="BackCompat"){com=1;}
			}
		}
	else{ie4=1;}
	}
else if(typeof document.getElementById!="undefined"){
	exclude=0;
	if(agt.indexOf("netscape/6")!=-1||agt.indexOf("netscape6")!=-1){ns6=1;}
	else if(agt.indexOf("netscape/7")!=-1||agt.indexOf("netscape7")!=-1){ns6=1;ns7=1;}
	else if(agt.indexOf("gecko")!=-1){ns6=1;mz7=1;}
	if(agt.indexOf("safari")!=-1 || (typeof document.childNodes!="undefined" && typeof document.all=="undefined" && typeof navigator.taintEnabled=="undefined")){mz7=0;ns6=1;saf=1;}
	}
else if((agt.indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=4)){
	exclude=0;
	ns4=1;
	if(typeof navigator.mimeTypes['*']=="undefined"){
		exclude=1;
		ns4=0;
		}
	}
if(agt.indexOf('escape')!=-1){exclude=1;ns4=0;}
if(typeof navigator.__ice_version!="undefined"){exclude=1;ie4=0;}

if(saf==1){
document.getElementById('flashmovie').safariTest(true);
} else {
document.getElementById('flashmovie').safariTest(false);
}

}