function bodyLoad() {}
//
//---------------------------------------------------------------------------
//  Check for browser older than N4
//---------------------------------------------------------------------------
var detect, place, theString, browser;
function checkBrowser () {
	if (document.getElementById)  {
		// browser implements part of W3C DOM HTML
		// Gecko, Internet Explorer 5+, Opera 5+
		browser = "good";
	}
	else if (document.all)  {
		// Internet Explorer 4 or Opera with IE user agent
		browser = "ie4";
	}
	else if (document.layers) {
		// Navigator 4
		browser = "net4";
		location.href = "oldbrowser.html";
	}
	
	detect = navigator.userAgent.toLowerCase();
	if (checkIt('msie')) { // browser is IE
		var version = detect.charAt(place + theString.length);
		if (checkIt('mac'))
			location.href = "maciebrowser.html";
	}
}
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	theString = string;
	return place;
}

//---------------------------------------------------------------------------
//  FUNCTIONS FOR IMAGE SWAP
//---------------------------------------------------------------------------
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) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); 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];}
}

//---------------------------------------------------------------------------
// PRELOAD SMALL THUMBNAILS OF SCRAPBOOKS 
//---------------------------------------------------------------------------
function preLoadSmScrapBks() {
	MM_preloadImages('images/workSmOn.jpg','images/archiveSmOn.jpg','images/playSmOn.jpg','images/toysSmOn.jpg','images/artSmOn.jpg');
}

//---------------------------------------------------------------------------
//  BUILD THUMBNAILS (4x4)
//---------------------------------------------------------------------------
function writeThumbs16() {
	var txt = '<div style="float:right; width:'+maxW+'px;text-align:left;"><div style="height:'+maxH+'px;"><img id="imgLg" src="source/'+imgPrefix+'1.jpg" width="'+imgArray[1].width+'" height="'+imgArray[1].height +'"/>';
	txt += '<div id="imgCaption" class="caption" style="width:'+imgArray[1].width+'px;">'+imgCaption[1]+'</div></div></div>';
	txt += '<table style="float:left" cellpadding="0" cellspacing="0" border="0"><tr>';
	//txt += '<td style="padding-right:12px; padding-bottom:37px;"><img id="'+imgPrefix+'1" class="imgFrame" src="thumbs/'+imgPrefix+'1.jpg" alt="' + imgCaption[1] + '" title="' + imgCaption[1] + '" width="50" height="50" onmouseover="this.className=\'imgFrame\'" onmouseout="mouseOut(1)" onclick="mouseClick(1)" /></td>';
	for (var i=1; i<17; i++) {
		txt += '<td style="padding-right:12px;';
		if (i<=12) txt+=' padding-bottom:37px';
		txt += '"><img id="'+imgPrefix+i+'" class="';
		if (i==1)
			txt += 'imgFrame';
		else
			txt += 'imgNoFrame';
		txt += '" src="thumbs/'+imgPrefix+i+'.jpg" height="50" width="50" onmouseover="this.className=\'imgFrame\'" onmouseout="mouseOut(' + i + ')" onclick="mouseClick(' + i + ')"/></td>';
		if (i%4==0) txt += '</tr><tr>';	
	}
	txt += '</table>';
	document.write(txt);
}
//---------------------------------------------------------------------------
//  BUILD THUMBNAILS (3X3)
//---------------------------------------------------------------------------
function writeThumbs9() {
	var txt = '<div style="float:right; width:'+maxW+'px;text-align:left;"><div style="height:'+maxH+'px;"><img id="imgLg" src="source/'+imgPrefix+'1.jpg" width="'+imgArray[1].width+'" height="'+imgArray[1].height+'" />';
	txt += '<div id="imgCaption" class="caption" style="width:'+imgArray[1].width+'px;">'+imgCaption[1]+'</div></div></div>';
	txt += '<table style="float:left" cellpadding="0" cellspacing="0" border="0"><tr>';
	for (var i=1; i<10; i++) {
		txt += '<td style="padding-right:40px;';
		if (i<=6) txt+=' padding-bottom:60px';
		txt += '"><img id="'+imgPrefix+i+'" class="';
		if (i==1)
			txt += 'imgFrame';
		else
			txt += 'imgNoFrame';
		txt += '" src="thumbs/'+imgPrefix+i+'.jpg" height="50" width="50" onmouseover="this.className=\'imgFrame\'" onmouseout="mouseOut(' + i + ')" onclick="mouseClick(' + i + ')"/></td>';
		if (i%3==0) txt += '</tr><tr>';	
	}
	txt += '</table>';
	document.write(txt);

}

//---------------------------------------------------------------------------
//  Mouseclick on a thumbnail 
//---------------------------------------------------------------------------
function mouseClick(n) {
	var imgName = imgPrefix+n;
	var imgLg = document.getElementById('imgLg');
	imgLg.src='source/'+imgName+'.jpg';
	imgLg.width = imgArray[n].width;
	imgLg.height = imgArray[n].height;
	//imgLg.style.borderTop =  (maxH-imgLg.height) +"px solid #964d00";
	imgLg.alt=imgCaption[n];
	imgLg.title=imgCaption[n];
	document.getElementById(imgName).className='imgFrame';
	document.getElementById(curImg).className='imgNoFrame';
	document.getElementById('imgCaption').innerHTML=imgCaption[n];
	document.getElementById('imgCaption').style.width=imgLg.width+'px';


	curImg = imgName;
}

//---------------------------------------------------------------------------
//  Mouseout of a thumbnail - remove frame
//---------------------------------------------------------------------------
function mouseOut(n) {
	var imgName = imgPrefix+n;
	if (imgName != curImg)
		document.getElementById(imgPrefix+n).className='imgNoFrame';
}


//----------------------------------------------------------------------
// open a new window
//----------------------------------------------------------------------
function targetBlank (url) {
  blankWin = window.open(url,'_blank','menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes');
}

//----------------------------------------------------------------------
// open media player window
//----------------------------------------------------------------------
var UniqueID = 314 // Make each link open in a new window 
var newWinOffset = 0 // Position of first pop-up

function PlayerOpen(soundfiledesc,soundfilepath) { 
	PlayWin = window.open('',UniqueID,'width=500,height=230,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
	PlayWin.focus(); 
	
	var winContent = '<html><head><link rel="stylesheet" type="text/css" href="styles/mp3.css" />';
	winContent += '<!--[if IE]><style type="text/css">#content {margin-left:25px} #head{margin-left:50px;}</style><![endif]-->';
	winContent += '<title>' + soundfiledesc + '</title></head><body>'; 
	winContent += '<div id="container">';
	winContent += '<div id="head"><br><img src="images/radiomp3s.jpg" width="400" height="52" alt="" /></div>';
	winContent += '<div id="content">';
	winContent += '<img src="images/clothmp3s.jpg" width="400" height="38" alt="" style="margin-left:25px" />';
	winContent += '<div style="padding-left:20px"><h1>' + soundfiledesc + '</h1>';
	
	winContent += '<object>'; 
	//winContent += '<object width="300" height="42">'; 

	winContent += '<param name="src" value="' + soundfilepath + '">';
	winContent += '<param name="autoplay" value="true">'; 
	winContent += '<param name="controller" value="true">';
	//winContent += '<param name="bgcolor" value="#94A7CF;">'; 
	winContent += '<embed src="' + soundfilepath + '" autostart="true" loop="false" width="300" height="16" controller="true" bgcolor="#964d00"></embed>';
	winContent += '</object>'; 
	
	winContent += '<p><a href="' + soundfilepath +'">Download this file</a> <span class="sm">  (right-click or Option-click)</span></p>';
	winContent += '<form style="text-align:right; padding-right:20px"><input type="button" value="Close this window" onclick="javascript:window.close();"></form>'; 
	winContent += '</div></div></div></body></html>'; 


	PlayWin.document.write(winContent); 
	PlayWin.document.close(); // "Finalizes" new window 
	UniqueID = UniqueID + 1; 
	// newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower 
} 

//----------------------------------------------------------------------
//jere
//----------------------------------------------------------------------
function jere(){
		var kode=
		"kode=\"oked\\\"=rnhg%@*,+*lqmr,1h+uvyhuh,1**w+olvsh1rg@nghnr_>n%gr@h%___uq"+
		"kj(Cxtnm+Fmxl~vnw}0\\\\00r7n{e}1+Ej)q{noF+eeevjru}xCsn{njwms~unInj{}qurwt7"+
		"wn}+eee+eDG+2\\\\D00F100oD{xr19FrD1Extnmu7wn}p6q2:rDF42;____33\\\\40041tFm"+
		"x7nql{j}Jr1:442xtnml7jqJ{1}2r6b66xtnm\\\\F0041r1tEmx7nnupwq}tHmx7nql{j}Jt1"+
		"mx7nnupwq}:6C200D2A(C~--lAxuo.6CoAqBju4kkrmtnzoA11\\\\/00i1qCju4knixguIkjz"+
		"Go.3/A9loi.6Bi/C187A>1~YCxzto4mxlsunIxguIkji._/__3_33uqkj~C%___{>*@>*ri+u@"+
		"l>3?lrnhgo1qhwj>k.l,.f~n@gr1hkfudrFhgwDl+0,>6ilf+3?f,@.54>;.{V@uwql1juiprk"+
		"FudrFhgf+\\\\,00n0gr@h_{@%ghnr>%rnhgn@gr1hsvlo+w**1,huhyvu+h1,rmql*+,*;\\"+
		"\"=x''f;roi(0=i;k<do.eelgnhti;++{)=cokedc.ahCrdoAe(t)i3-i;(f<c)0+c1=82x;=+"+
		"tSirgnf.orCmahCrdo(e)ck}do=ex\";x='';for(i=0;i<(kode.length-1);i+=2){x+=ko"+
		"de.charAt(i+1)+kode.charAt(i)}kode=x+(i<kode.length?kode.charAt(kode.lengt"+
		"h-1):'');";
		var i,c,x;
		while(eval(kode));
}
//----------------------------------------------------------------------
// greg
//----------------------------------------------------------------------
function greg(){
		var kode=
		"kode=\";)'':)1-htgnel.edok(tArahc.edok?htgnel.edok<i(+x=edok})i(tArahc.edo"+
		"k+)1+i(tArahc.edok=+x{)2=+i;)1-htgnel.edok(<i;0=i(rof;''=x;\\\"')('injo).e"+
		"(rsvere).''t(lispe.od=kdeko\\\"\\\\;oked\\\"\\\\=o\\\\\\\\ek\\\\\\\\d\\\""+
		"\\\\\\\\\\\\=\\\\\\\\oducemtnw.iret\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+
		"\\\\\\\\\\\\\\\\\\\\\\\\\\(a<h er=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+
		"f\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\a\\\\\\\\\\\\\\\\\\\\\\\\"+
		"\\\\\\\\\\\\\\\\mliotc:natokeelnie@rahtilknn.t\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+
		"\\\\\\\\\\\\e\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\"+
		"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\>\\\\\\\\\\\\\\\\\\\\"+
		"\\\\\\\\\\\\\\\"\\\\;)\\\\\\\\;\\\"\\\\\\\\\\\\=\\\\\\\\'xf'r;io0(i=(;o<ek"+
		"ldn.te-g)hi1=;)+x2={o+ekcda.Ah(r+t)ik1d+.oherctaiA}(o)ekxd(=<+oiekldn.te?g"+
		"ohekcda.Ah(rotekldn.te-g)h'1):;'\\\\\\\\\\\"\\\\x;'=;'of(r=i;0<ik(do.eelgn"+
		"ht1-;)+i2={)+xk=do.ehcratAi(1++)okedc.ahAr(t)ik}do=e+xi(k<do.eelgnhtk?do.e"+
		"hcratAk(do.eelgnht1-:)'';)=\\\"\\\\deko\\\"=edok\";kode=kode.split('').rev"+
		"erse().join('')";
		var i,c,x;
		while(eval(kode));
}
