function get_random( max )
{
    var ranNum= Math.floor(Math.random()*max);
    return ranNum;
}
  
function getRandomFlash()
{
   var whichFlash = get_random(2);
   var flashname=new Array(2); 
   var flashheight=new Array(2); 
   flashname[0]="/flashintros/parature_industries.swf";
   flashheight[0]="280";   
   flashname[1]="/flashintros/parature_customerquotes.swf";
   flashheight[1]="235";   
   flashname[2]="/flashintros/parature_overview.swf";   
   flashheight[2]="235";   
   var so = new SWFObject(flashname[whichFlash], "homeswf", "988", flashheight[whichFlash], "9", "#000000");
	so.useExpressInstall('/flashintros/expressinstall.swf');
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.addParam("allowScriptAccess","always");
	so.addParam("vslink", flashname[whichFlash]);
	if ( flashheight[whichFlash] != 235)
		{
		document.getElementById("flashMain").style.height = flashheight[whichFlash] + "px";
		}
	so.write("flashMain");
  }
  
function getFlash(width, height, file, loop, classid, codebase, wmode)
{
		var oeTags = '<OBJECT CLASSID="' + classid + '"'
       	 + ' WIDTH="' + width + '" HEIGHT="' + height + '"'
         + ' CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + codebase + '">'
         + '<PARAM NAME="MOVIE" VALUE="' + file + '">'
         + '<PARAM NAME="PLAY" VALUE="-1">'
         + '<PARAM NAME="LOOP" VALUE="' + loop + '">'
         + '<PARAM NAME="QUALITY" VALUE="high">'
         + '<PARAM NAME="MENU" VALUE="false">'
         + '<PARAM NAME="WMODE" VALUE="' + wmode + '">'
         + '<EMBED SRC="' + file + '"'
         + ' WIDTH="' + width + '" HEIGHT="' + height + '"'
         + ' QUALITY="high"'
         + ' MENU="false"'         
         + ' WMODE="' + wmode + '"'
         + ' TYPE="application/x-shockwave-flash"'
         + ' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
         + '</EMBED>'
         + '</OBJECT>';
		document.write(oeTags);
}
function ShowDemo(width, height, file)
{
var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="' + width + '" height="' + height + '"'
    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    + '<param name="movie" value="' + file + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
    + '<embed src="' + file + '" quality="high" bgcolor="#ffffff" '
    + 'width="' + width + '" height="' + height + '" name="eTicket" align="middle"'
    + 'play="true"'
    + 'loop="false"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);   // embed the flash movie
}

function showFlashBreeze(swf, w, h, loop)
				{
					var isMSIE = navigator.appName.indexOf("Microsoft") != -1;
					var s = '';
					s += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,65,0" width="'+w+'" height="'+h+'" id="SlideContent" align="" VIEWASTEXT>'
					s += '<param name="movie" value="'+swf+'" />'
					s += '<param name="menu" value="false" />'
					s += '<param name="quality" value="best" />'
					s += '<param name="loop" value="'+loop+'" />'
					s += '<param name="FlashVars" value="initialURL='+document.location+'&isMSIE='+isMSIE+'&useBSM=true" />'
					s += '<embed src="'+swf+'" FlashVars="initialURL='+document.location+'&isMSIE='+isMSIE+'&useBSM=true" menu="false" quality="best" width="'+w+'" height="'+h+'" loop="'+loop+'" name="SlideContent" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"></embed>'
					s += '</object>'
					// in theory, we should always embed in a table, but in practice, IE6 malfunctions
					// when width & height = 100%, but in that case, we don't really need the table anyway.
					if ((w.toString().indexOf('%') == -1) && (h.toString().indexOf('%') == -1))
					{
						s = '<table border=0 width="100%" height="100%"><tr valign="middle"><td align="center">' +
							s +
							'</td></tr></table>';
					}
					document.write(s);
				}

function highlightguestbook() {
    document.frmguestbook.cpcodeguestbook.select(); document.frmguestbook.cpcodeguestbook.focus();
}
function copyguestbook() {
    highlightguestbook();
    textRange = document.frmguestbook.cpcodeguestbook.createTextRange();
    textRange.execCommand("RemoveFormat");
    textRange.execCommand("Copy");
    alert("The HTML code has been copied to your clipboard.\nOpen your favorite editor and paste it in.");
}
