function find_home() {
	var loc=(location.href).split('/');
	var loc_num;
	var answer='';
	for(i = 0; i < loc.length; i++) {
		if ((loc[i].split('solidrockresources')).length > 1) loc_num=i;
	}
	for(i = 0; i < (loc.length-2-loc_num); i++) {
		answer=answer + '../';
	}
	return answer;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Test for Flash
var playstop=false;
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i]))) continue;
		var MM_PluginVersion = words[i]; 
		}
	var FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	if (playstop) FlashCanPlay=false;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('MM_contentVersion = ' + MM_contentVersion + ' \n');
		document.write('on error resume next \n');
		document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		if (playstop) document.write('FlashCanPlay=false');
		document.write('</SCR' + 'IPT\> \n');
		}
		

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
}

function rand(number) {
        return Math.ceil(rnd()*number);
}

function jcpic() {
	var bw='bw';
	if (rand(2)==1) bw='';
	document.write('<img src="/images/jcpic' + (rand(4)-1) + bw + '.jpg" width="75" height="100" border="0" alt="Promo Images" style="border-color:#000000; border-width:1px">');
}

var logobar=rand(2);

function winopen(url) {
	window.open(url,"","toolbar=yes, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, width=715, height=700");

	/*
	"toolbar=no, directories=no, location=no, status=yes, menubar=no, resizable=no, scrollbars=no, width=300, height=200"

	toolbar - displays the browser buttons (forward, back, home, print, etc) 
	location - displays the field that shows the URL for the window 
	directories - displays other web browser directory buttons 
	status - displays the browser status bar at the bottom 
	menubar - displays the web browser menu bar 
	resizable - allows user to change the size of the window 
	scrollbars - provides scroll bars if the content is larger than the window size 
	width=XX - specifies the width of the window when opened, in pixels 
	height=YY - specifies the height of the window when opened, in pixels
	*/
}
