﻿// ext.js in http://eul0001048.eu.verio.net for xml site


function showAll(vid,frmNo) {
		show('menu'+vid+'x'+frmNo);
		frName=	'frame'+vid+'x'+frmNo;
	if(frmNo==1)
	{
	url='archive-change-details.php?viral_id='+vid;
	}
	else if(frmNo==2)
	{
	url='archive-change-info.php?viral_id='+vid;
	}
	else if(frmNo==3)
	{
	url='archive-change-organize.php?viral_id='+vid;
	}
	else
	{
	url='archive-change-privacy.php?viral_id='+vid;
	}	
		to1=setTimeout("loadIframe(frName,url)",300);

			
}

function loadIframe(iframeName, url) {
  if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;    
	return false;
  }

  else  
 // alert ("dont support");
 return true;
}


function changeNew() {
		return "archive-change-details.php?viral_id=5";
}

function changeIt(vid,frmNo) {
	if(frmNo==1)
	{
	return "archive-change-details.php?viral_id="+vid;
	}
	else if(frmNo==2)
	{
	return "archive-change-info.php?viral_id="+vid;
	}
	else if(frmNo==3)
	{
	return "archive-change-organize.php?viral_id="+vid;
	}
	else
	{
	return "archive-change-privacy.php?viral_id="+vid;
	}
}

/*
	function show(whichLayer)
{

if (document.getElementById)
{
	var style2 = document.getElementById(whichLayer).style;
	if(document.getElementById(whichLayer).style)
	{
	alert("show whichlayer");
	style2.display = "block";
	
	}
}
else if (document.all)
{
	var style2 = document.all[whichLayer].style;
	if(document.all[whichLayer].style)
	{
	style2.display = "block";
	show(whichLayer+"1");
	}
}
else if (document.layers)
{
	var style2 = document.layers[whichLayer].style;
	if(document.all[whichLayer].style)
	{
	style2.display = "block";
	show(whichLayer+"1");
	}
}
}

function hide(whichLayer)
{
if (document.getElementById)
{
	var style2 = document.getElementById(whichLayer).style;
	if(document.getElementById(whichLayer).style)
	{
	alert("hide whichlayer");
	style2.display = "none";
	
	}
	
}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
style2.display = "none";
}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
style2.display = "none";
}
}

*/

//detection stuff

var bName = navigator.appName;
var bVersion = parseInt(navigator.appVersion);
var plat = navigator.platform;
ua=navigator.userAgent;

if (bName.indexOf('Netscape') != -1){
var isNS = 1;
}
else if(bName.indexOf('Microsoft') != -1){
var isIE = 1;
}

if(plat.indexOf('Win')!= -1){
var isWin = 1;
}

if(ua.indexOf('AOL') != -1){
var isAOL = 1;
}

////////////////// SHOW HIDE LAYERS USING DISPLAY BLOCK ////////////////

function show(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
style2.display = "block";
}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
style2.display = "block";
}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
style2.display = "block";
}
}

function hide(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
style2.display = "none";
}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
style2.display = "none";
}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
style2.display = "none";
}
}


/////////////////////////////////////////////////////////////////////////

////////////////// SHOW HIDE LAYERS USING VISIBILITY ////////////////

function show_vis(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
style2.visibility='visible';
}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
style2.display = "block";
}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
style2.visibility = "show";
}
}

function hide_vis(whichLayer)
{
if (document.getElementById)
{
var style2 = document.getElementById(whichLayer).style;
style2.visibility='hidden';
}
else if (document.all)
{
var style2 = document.all[whichLayer].style;
style2.display = "";
}
else if (document.layers)
{
var style2 = document.layers[whichLayer].style;
style2.visibility = "hide";
}
}

/////////////////////////////////////////////////////////////////////////
////////////////// TOGGLE LAYER ////////////////

function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}


/////////////////////////////////////////////////////////////////////////
////////////////// WRITE TEXT TO DIV ////////////////

function writit(text_title,id_title,text_subtitle,id_subtitle)
{
	if (document.getElementById)
	{
		x = top.document.getElementById(id_title);
		x.innerHTML = '';
		x.innerHTML = text_title;
		y = top.document.getElementById(id_subtitle);
		y.innerHTML = '';
		y.innerHTML = text_subtitle;
	}
	else if (document.all)
	{
		x = top.document.all[id_title];
		x.innerHTML = text_title;
		y = top.document.all[id_subtitle];
		y.innerHTML = text_subtitle;
	}
}

/////////////////////////////////////////////////////////////////////////


// script to set menu items
function set_menu(itemno){
obj = (document.getElementById ? 1 : 0) ? document.getElementById(itemno) : document.all(itemno)
obj.style.background='#edebe6';
obj.style.color='#000000';
}


function set_last_visited(itemno){
if(itemno!=0){
obj = (document.getElementById ? 1 : 0) ? document.getElementById(itemno) : document.all(itemno)
if(obj){obj.style.background='#d4e7ee';
obj.style.color='#000000';}
}
}


// script to set menu items in tools
function set_menu_tools(itemno){
obj = (document.getElementById ? 1 : 0) ? document.getElementById(itemno) : document.all(itemno)
obj.style.background='#edebe6';
obj.style.color='#000000';
}


// script to set lev3 menu
function set_month(itemno){
obj = (document.getElementById ? 1 : 0) ? document.getElementById(itemno) : document.all(itemno)
obj.style.borderTopWidth='1';obj.style.borderBottomWidth='1';obj.style.borderLeftWidth='0';obj.style.borderRightWidth='0';obj.style.borderColor='#000000';obj.style.borderStyle='solid';
}


/*
Open a new window called win2.
Switch the window features on or off as required e.g. scrollbars=yes
The size is dependent on the browser/platform etc.
This could be rewritten to tie in with the detection stuff at the top of this page.
*/
function openWin(url) {
var x=10,y=10
//var x=(screen.availWidth-630)
var vs=navigator.appVersion,v=parseFloat(vs),m=(vs.indexOf('Mac')>-1?true:false),w=(vs.indexOf('Win')>-1?true:false),ie=(document.all?true:false);
var bts=vs.split(' ');for(var i=0;i<bts.length;i++){if(parseFloat(bts[i])>=5&&parseFloat(bts[i])<10)v=parseFloat(bts[i])};

if(ie&&m&&v>=4&&v<5)
var sz=",width=610,height=426";

else if(ie&&m&&v>=5) 
var sz=",width=610,height=406";

else if(ie&&w&&v>=4)
var sz=",width=610,height=388";

else 
var sz=",width=610,height=408";

window.open(url,'win2','left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=yes,scrollbars=no,resizable=no,menubar=yes'+sz);
}


function openWinTools(url) {
var x=10,y=10
//var x=(screen.availWidth-630)
var vs=navigator.appVersion,v=parseFloat(vs),m=(vs.indexOf('Mac')>-1?true:false),w=(vs.indexOf('Win')>-1?true:false),ie=(document.all?true:false);
var bts=vs.split(' ');for(var i=0;i<bts.length;i++){if(parseFloat(bts[i])>=5&&parseFloat(bts[i])<10)v=parseFloat(bts[i])};

if(ie&&m&&v>=4&&v<5)
var sz=",width=610,height=486";

else if(ie&&m&&v>=5) 
var sz=",width=610,height=466";

else if(ie&&w&&v>=4)
var sz=",width=610,height=448";

else 
var sz=",width=610,height=468";

window.open(url,'win2','left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=yes,scrollbars=yes,resizable=yes,menubar=yes,location=yes'+sz);
}



function openwin_counter(url) {
window.open(url,'win2','width=50,height=50,status=no,resizable=no,menubar=no,scrollbars=no');
}



function openWinPoll(url) {
var x=50,y=50
//var x=(screen.availWidth-630)
var vs=navigator.appVersion,v=parseFloat(vs),m=(vs.indexOf('Mac')>-1?true:false),w=(vs.indexOf('Win')>-1?true:false),ie=(document.all?true:false);
var bts=vs.split(' ');for(var i=0;i<bts.length;i++){if(parseFloat(bts[i])>=5&&parseFloat(bts[i])<10)v=parseFloat(bts[i])};

if(ie&&m&&v>=4&&v<5)
var sz=",width=550,height=500";

else if(ie&&m&&v>=5) 
var sz=",width=550,height=500";

else if(ie&&w&&v>=4)
var sz=",width=550,height=500";

else 
var sz=",width=550,height=500";

window.open(url,'win3','left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=yes,scrollbars=yes,resizable=yes,menubar=no,location=no'+sz);
}




function openWinSmall(url) {
var x=50,y=50
//var x=(screen.availWidth-630)
var vs=navigator.appVersion,v=parseFloat(vs),m=(vs.indexOf('Mac')>-1?true:false),w=(vs.indexOf('Win')>-1?true:false),ie=(document.all?true:false);
var bts=vs.split(' ');for(var i=0;i<bts.length;i++){if(parseFloat(bts[i])>=5&&parseFloat(bts[i])<10)v=parseFloat(bts[i])};

if(ie&&m&&v>=4&&v<5)
var sz=",width=350,height=400";

else if(ie&&m&&v>=5) 
var sz=",width=250,height=400";

else if(ie&&w&&v>=4)
var sz=",width=350,height=400";

else 
var sz=",width=350,height=400";

window.open(url,'win4','left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=yes,scrollbars=yes,resizable=yes,menubar=no,location=no'+sz);
}




// HIDE EMAILS FROM SPAMBOTS - START

//pick up lines for valentine's day
function emailhider_pickuplines()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'pickuplines';
var the_domain = 'boreme';
var ext = 'com'; 
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext); 
document.write('">'); 
//span text formatting starts here
document.write('<font color="#FFFFFF">');
document.write('<strong>email us</strong>');
//span text formatting ends here
document.write('</font>');
document.write('</a>');
}

//comments for vw polo suicide bomber viral
function emailhider_comments()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'comments';
var the_domain = 'boreme';
var ext = 'com'; 
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext); 
document.write('" class="link-size-12">');
//span text formatting starts here
document.write('<strong>email us</strong>');
//span text formatting ends here
document.write('</a>');
}


//nic stevens
function emailhider_nic()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'nic';
var the_domain = 'boreme';
var ext = 'com'; 
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext);
document.write('">'); 
//span text formatting starts here
document.write('<span class="tools">');
document.write('&#110;&#105;&#099;&#064;&#098;&#111;&#114;&#101;&#109;&#101;&#046;&#099;&#111;&#109;');
//span text formatting ends here
document.write('</span>');
document.write('</a>');
}


//contribute
function emailhider_contribute()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'contribute';
var the_domain = 'boreme';
var ext = 'com'; 
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext);
document.write('" onfocus="this.blur()">');
//span text formatting starts here
document.write('<span class="tools">');
document.write('&#099;&#111;&#110;&#116;&#114;&#105;&#098;&#117;&#116;&#101;&#064;&#098;&#111;&#114;&#101;&#109;&#101;&#046;&#099;&#111;&#109;');
//span text formatting ends here
document.write('</span>');
document.write('</a>');
}


//contribute - contact page
function emailhider_contribute_contact_page()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'contribute';
var the_domain = 'boreme';
var ext = 'com'; 
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext);
document.write('">');
//span text formatting starts here
document.write('<span class="tools">');
document.write('&#099;&#111;&#110;&#116;&#114;&#105;&#098;&#117;&#116;&#101;&#064;&#098;&#111;&#114;&#101;&#109;&#101;&#046;&#099;&#111;&#109;');
//span text formatting ends here
document.write('</span>');
document.write('</a>');
}


//sophie
function emailhider_sophie()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'sophie';
var the_domain = 'boreme';
var ext = 'com'; 
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext);
document.write('">');
//span text formatting starts here
document.write('<span class="tools">');
document.write('&#115;&#111;&#112;&#104;&#105;&#101;&#064;&#098;&#111;&#114;&#101;&#109;&#101;&#046;&#099;&#111;&#109;');
//span text formatting ends here
document.write('</span>');
document.write('</a>');
}


//subscribe
function emailhider_subscribe()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'subscribe';
var the_domain = 'boreme';
var ext = 'com';
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext);
document.write('">');
//span text formatting starts here
document.write('<span class="tools">');
document.write('email us');
//span text formatting ends here
document.write('</span>');
document.write('</a>');
}


//harry
function emailhider_harry()
{
var code1 = 'm';
var code2 = 'ail';
var code3 = 'to';
var code4 = ':';
var the_address = 'boreme';
var the_domain = 'hotcherry';
var ext = 'co.uk';
document.write('<a href="');
document.write(code1+code2+code3+code4);
document.write(the_address);
document.write('&#64;');
document.write(the_domain);
document.write('.');
document.write(ext);
document.write('">');
//span text formatting starts here
document.write('<span class="tools">');
document.write('&#098;&#111;&#114;&#101;&#109;&#101;&#064;&#104;&#111;&#116;&#099;&#104;&#101;&#114;&#114;&#121;&#046;&#099;&#111;&#046;&#117;&#107;');
//span text formatting ends here
document.write('</span>');
document.write('</a>');
}

// HIDE EMAILS FROM SPAMBOTS - END





//////////////////////////////// NEW CODE FOR XML SITE /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


//active x workaround for MOV
function writeMOVCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="' + bm_movie_height + '" width="' + bm_movie_width + '">');
document.write('<param name="bgcolor" value="' + bm_movie_bgcolor + '">');
document.write('<param name="src" value="' + path + '/' + bm_movie_fileroot + '.mov">');
document.write('<param name="autoplay" value="' + bm_autostart + '">');
document.write('<param name="controller" value="true">');
document.write('<embed height="' + bm_movie_height + '" width="' + bm_movie_width + '" name="' + bm_movie_name + '" pluginspage="http://www.apple.com/quicktime/download/" src="' + path + '/' + bm_movie_fileroot + '.mov" type="video/quicktime" controller="true" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></embed></object>');
}


// active x workaround for QT (e.g. m_mccoy_kiss_kirk.qt)
function writeQTCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="' + bm_movie_height + '" width="' + bm_movie_width + '" name="' + bm_movie_fileroot + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="src" value="' + path + '/' + bm_movie_fileroot + '.qt" /><param name="autoplay" value="' + bm_autostart + '" /><param name="controller" value="true" /><embed height="' + bm_movie_height + '" name="' + bm_movie_fileroot + '" pluginspage="http://www.apple.com/quicktime/download/" src="' + path + '/' + bm_movie_fileroot + '.qt" type="video/quicktime" width="' + bm_movie_width + '" controller="true" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></object>');
}



// active x workaround for WMV
function writeWMVCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="' + bm_movie_width + '" height="' + bm_movie_height + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="AutoStart" value="' + bm_autostart + '"><param name="uiMode" value="full"><param name="url" value="' + path + '/' + bm_movie_fileroot + '.wmv" /><embed type="application/x-mplayer2" src="' + path + '/' + bm_movie_fileroot + '.wmv" name="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '" autostart="' + bm_autostart + '"></embed></object>');
}



// active x workaround for AVI
function writeAVICode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="' + bm_movie_height + '" width="' + bm_movie_width + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="src" value="' + path + '/' + bm_movie_fileroot + '.avi" /><param name="FileName" value="' + bm_movie_fileroot + '.avi" /><param name="animationatStart" value="true" /><param name="transparentatStart" value="false" /><param name="autoStart" value="' + bm_autostart + '" /> <embed height="' + bm_movie_height + '" name="MediaPlayer1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="' + path + '/' + bm_movie_fileroot + '.avi" type="application/x-mplayer2" width="' + bm_movie_width + '" AutoStart="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></object>');
}


// active x workaround for MPG
function writeMPGCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="AutoStart" value="' + bm_autostart + '" /><param name="uiMode" value="full"><param name="url" value="' + path + '/' + bm_movie_fileroot + '.mpg"><embed src="' + path + '/' + bm_movie_fileroot + '.mpg"  type="video/mpg" name="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></embed></object>');
}




// active x workaround for MPEG
function writeMPEGCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="AutoStart" value="' + bm_autostart + '" /><param name="uiMode" value="full"><param name="url" value="' + path + '/' + bm_movie_fileroot + '.mpeg"><embed src="' + path + '/' + bm_movie_fileroot + '.mpeg"  type="video/mpeg" name="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></embed></object>');
}



// active x workaround for MPA
function writeMPACode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="AutoStart" value="' + bm_autostart + '" /><param name="uiMode" value="full"><param name="url" value="' + path + '/' + bm_movie_fileroot + '.mpa"><embed src="' + path + '/' + bm_movie_fileroot + '.mpa"  type="video/mpa" name="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></embed></object>');
}



// active x workaround for MPE
function writeMPECode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="AutoStart" value="' + bm_autostart + '" /><param name="uiMode" value="full"><param name="url" value="' + path + '/' + bm_movie_fileroot + '.mpa"><embed src="' + path + '/' + bm_movie_fileroot + '.mpe"  type="video/mpe" name="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></embed></object>');
}



// active x workaround for MP4
function writeMP4Code(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object height="' + bm_movie_height + '" width="' + bm_movie_width + '" name="' + bm_movie_fileroot + '"> <param name="bgcolor" value="' + bm_movie_bgcolor + '"> <param name="src" value="' + path + '/' + bm_movie_fileroot + '.mp4"> <param name="autoplay" value="' + bm_autostart + '"> <param name="controller" value="true"> <embed height="' + bm_movie_height + '" name="' + bm_movie_fileroot + '" src="' + path + '/' + bm_movie_fileroot + '.mp4" width="' + bm_movie_width + '" controller="true" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></object>');
}


// active x workaround for ASF
function writeASFCode(bm_movie_height,bm_movie_width,path,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '"><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="AutoStart" value="' + bm_autostart + '"><param name="uiMode" value="full"><param name="url" value="' + path + '/' + bm_movie_fileroot + '.asf"><embed src="' + path + '/' + bm_movie_fileroot + '.asf"  type="video/asf" name="Player" width="' + bm_movie_width + '" height="' + bm_movie_height + '" autoplay="true" bgcolor="' + bm_movie_bgcolor + '" autostart="' + bm_autostart + '"></embed></object>');
}



// active x workaround for RM
function writeRMCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="' + bm_movie_height + '" width="' + bm_movie_width + '"><param name="controls" value="ImageWindow" /><param name="autostart" value="' + bm_autostart + '" /><param name="src" value="' + path + '/' + bm_movie_fileroot + '.rm" /><embed height="' + bm_movie_height + '" src="' + path + '/' + bm_movie_fileroot + '.rm" type="audio/x-pn-realaudio-plugin" width="' + bm_movie_width + '" controls="ImageWindow" autostart="' + bm_autostart + '"></object>');
}



// active x workaround for MP3 forcing QT player
function writeMP3Code(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_autostart)
{
document.write('<embed height="' + bm_movie_height + '" width="' + bm_movie_width  + '" name="' + bm_movie_name + '" pluginspage="http://www.apple.com/quicktime/download/" src="' + path + '/' + bm_movie_fileroot + '.mp3" type="video/quicktime" controller="true" autoplay="' + bm_autostart + '"></embed>');
}



// active x workaround for WAV
function writeWAVCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_autostart)
{
document.write('<object height="' + bm_movie_height + '" width="' + bm_movie_width + '"><param name="autostart" value="' + bm_autostart + '"><param name="src" value="' + path + '/' + bm_movie_fileroot + '.wav"><embed height="' + bm_movie_height + '" src="' + path + '/' + bm_movie_fileroot + '.wav" type="audio/wav" width="' + bm_movie_width + '" autostart="' + bm_autostart + '"></object>');
}


// active x workaround for WMA
function writeWMACode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="' + bm_movie_height + '" width="' + bm_movie_width + '"> <param name="bgcolor" value="' + bm_movie_bgcolor + '"> <param name="src" value="' + path + '/' + bm_movie_fileroot + '.wma"> <param name="FileName" value="' + bm_movie_fileroot + '.wma"> <param name="animationatStart" value="true"> <param name="transparentatStart" value="false"> <param name="autoStart" value="' + bm_autostart + '"> <embed height="' + bm_movie_height + '" name="MediaPlayer1" src="' + path + '/' + bm_movie_fileroot + '.wma" type="application/x-mplayer2" width="' + bm_movie_width + '" AutoStart="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></object>');
}


// active x workaround for DCR
function writeDCRCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor)
{
document.write('<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" height="' + bm_movie_height + '" width="' + bm_movie_width + '" name="' + bm_movie_fileroot + '"><param name="quality" value="best" /><param name="bgcolor" value="' + bm_movie_bgcolor + '" /><param name="src" value="' + path + '/' + bm_movie_fileroot + '.dcr" /><param name="autoplay" value="true" /><param name="controller" value="true" /><embed height="' + bm_movie_height + '" name="' + bm_movie_fileroot + '" src="' + path + '/' + bm_movie_fileroot + '.dcr" width="' + bm_movie_width + '" controller="true" autoplay="true" bgcolor="' + bm_movie_bgcolor + '" quality="best"></object>');
}


//active x workaround for 3GP
function write3GPCode(bm_movie_height,bm_movie_width,path,bm_movie_name,bm_movie_fileroot,bm_movie_bgcolor,bm_autostart)
{
document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="' + bm_movie_height + '" width="' + bm_movie_width + '">');
document.write('<param name="bgcolor" value="' + bm_movie_bgcolor + '">');
document.write('<param name="src" value="' + path + '/' + bm_movie_fileroot + '.3gp">');
document.write('<param name="autoplay" value="' + bm_autostart + '">');
document.write('<param name="controller" value="true">');
document.write('<embed height="' + bm_movie_height + '" width="' + bm_movie_width + '" name="' + bm_movie_name + '" pluginspage="http://www.apple.com/quicktime/download/" src="' + path + '/' + bm_movie_fileroot + '.3gp" type="video/quicktime" controller="true" autoplay="' + bm_autostart + '" bgcolor="' + bm_movie_bgcolor + '"></embed></object>');
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




// active x workaround for SWF
//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

// COMMENTED OUT, COS IT WAS DUPLICATED AT http://www.boreme.com/boreme/scripts/general.js
/*
function AC_FL_Run_Skinable(murl,vid,ipAdd,configXml){
  AC_FL_RunContent("codebase","http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0","allowScriptAccess","sameDomain","width","424","height","491","wmode","opaque","src",murl,"quality","high","name","newplayer","pluginspage","http://www.macromedia.com/go/getflashplayer","movie",murl,"FlashVars","&playerWidth=424&playerHeight=491&videoId=" + vid + "&ipAdd=" + ipAdd + "&configXml=" + configXml);
  
}
*/


function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
