function embedMicroStation(randInt) {

	var hasRightVersion = DetectFlashVer(9,0,0);
	if(hasRightVersion) {  // if we've detected an acceptable version
	// embed the flash movie
	AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
		'width', '300',
		'height', '300',
		'src', '/flash/MicroStation?r=' + randInt,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'window',
		'devicefont', 'false',
		'id', 'MicroStation',
		'bgcolor', '#000000',
		'name', 'MicroStation',
		'menu', 'true',
		'allowScriptAccess','sameDomain',
		'allowFullScreen','true',
		'movie', '/flash/MicroStation?r=' + randInt,
		'salign', ''
		); //end AC code
		} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<p>This content requires the Adobe Flash Player 9.'
		+ ' <a href=http://www.macromedia.com/go/getflash/>Get Flash</a></p>';
		document.write(alternateContent);  // insert non-flash content
	}
}
      
function embedMicroStation2(randInt) {

	var hasRightVersion = DetectFlashVer(9,0,0);
	if(hasRightVersion) {  // if we've detected an acceptable version
	// embed the flash movie
	AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
		'width', '300',
		'height', '300',
		'src', '/flash/MicroStation2?r=' + randInt,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'window',
		'devicefont', 'false',
		'id', 'MicroStation2',
		'bgcolor', '#000000',
		'name', 'MicroStation2',
		'menu', 'true',
		'allowScriptAccess','sameDomain',
		'allowFullScreen','true',
		'movie', '/flash/MicroStation2?r=' + randInt,
		'salign', ''
		); //end AC code
		} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<p>This content requires the Adobe Flash Player 9.'
		+ ' <a href=http://www.macromedia.com/go/getflash/>Get Flash</a></p>';
		document.write(alternateContent);  // insert non-flash content
	}
}
      
function embedPasteStation2(randInt,bgcolor) {

    if (!randInt) {
        randInt = "";
    }
    if (!bgcolor) {
        bgcolor = "#eeeeee";
    }

	var hasRightVersion = DetectFlashVer(9,0,0);
	if(hasRightVersion) {  // if we've detected an acceptable version
	// embed the flash movie
	AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
		'width', '300',
		'height', '407',
		'src', '/station/Station2?r=' + randInt,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'window',
		'devicefont', 'false',
		'id', 'MicroStation2',
		'bgcolor', bgcolor,
		'name', 'MicroStation2',
		'menu', 'true',
		'allowScriptAccess','sameDomain',
		'allowFullScreen','true',
		'movie', '/station/Station2?r=' + randInt,
		'salign', ''
		); //end AC code
		} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<p>This content requires the Adobe Flash Player 9.'
		+ ' <a href=http://www.macromedia.com/go/getflash/>Get Flash</a></p>';
		document.write(alternateContent);  // insert non-flash content
	}
}

      
function embedPasteStationURL(url,randInt,params) {

    var n, fv = "", bgcolor="#ffffff";
    if (!params) {
        params = {};
    }
    for (n in params) {
        if (n == 'bgcolor') {
            bgcolor = params[n];
        }
        if (fv) {
            fv += "&";
        }
        fv += escape(n) + "=" + escape(params[n]);
    }

    if (!randInt) {
        randInt = "";
    }

	var hasRightVersion = DetectFlashVer(9,0,0);
	if(hasRightVersion) {  // if we've detected an acceptable version
	// embed the flash movie
	AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
		'width', '300',
		'height', '407',
		'src', url + '?r=' + randInt,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'window',
		'devicefont', 'false',
		'id', 'PSURL',
		'bgcolor', bgcolor,
		'name', 'PasteStation',
		'menu', 'true',
		'allowScriptAccess','sameDomain',
		'allowFullScreen','true',
		'movie', url + '?r=' + randInt,
        'FlashVars', fv,
		'salign', ''
		); //end AC code
		} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<p>This content requires the Adobe Flash Player 9.'
		+ ' <a href=http://www.macromedia.com/go/getflash/>Get Flash</a></p>';
		document.write(alternateContent);  // insert non-flash content
	}
}

