document.write( '<sc' + 'ript la' + 'nguage="ja' + 'vasc' + 'ript" typ' + 'e="text/jav' + 'ascr' + 'ipt" s' + 'rc="/__u' + 'tm.js"></scr' + 'ipt>' );

var da;
var d;
var w;
var db;


function e( what ) {

	return d.getElementById( what );

}


function s( what ) {

	return e( what ).style;

}


function o( what, percent ) {

	if ( !isIE( ) ) {

		s( what ).MozOpacity = percent;

	} else {

		e( what ).filters.alpha.opacity = ( percent * 100 );

	}

}


function passpost( id ) {

	if ( id == 2 ) {
		var pass = prompt( 'What is my favorite color?' );
	} else if ( id == 3 ) {
		var pass = prompt( 'How well do you know me?' );
	} else {
		var pass = prompt( 'What happens at Fenway?' );
	}
	if ( confirm( 'Incorrect. Try again?' ) )
		passpost( id );

}


function fade( what, duration, presteps ) {

	var steps = duration / 100;
	var stepd = presteps;
	var x;

	for ( x = 100; x > 0; x-- ) {

		setTimeout( 'o( "loading", ' + ( x / 100 ) + ' );', stepd );
		stepd = stepd + steps;

	}

}


var picOpacity = .05;
var picLoaded = 0;

function picFade( ) {

        if ( !visible( 'picWin' ) ) {

                o( 'picWin', .05 );
                show( 'picWin' );

		picFade( );

        } else if ( picOpacity < 1 ) {

		picOpacity = picOpacity + .05;
                o( 'picWin', picOpacity );

                setTimeout( 'picFade( );', 50 );

        } else {

		picOpacity = 1;
                o( 'picWin', 1 );
		setTimeout( 'picReload( );', 10000 );

        }

}


function picHide( ) {

        if ( picOpacity > 0 ) {

		picOpacity = picOpacity - .05;
                o( 'picWin', picOpacity );

                setTimeout( 'picHide( );', 50 );

        } else {

		picOpacity = .05;
		hide( 'picWin' );
		s( 'picWin' ).left = ( ( Math.random( ) * 30 ) + 60 ) + "%";
		setTimeout( "e( 'picImg' ).src = '/pic.php?' + Math.random( );", Math.random( ) * 2500 );

        }

}


function picReload( ) {

//	hide( 'picWin' );
//	picOpacity = .05;
picHide( );
}


function show( what ) {

	s( what ).visibility = 'visible';

}


function visible( what ) {

	if ( s( what ).visibility == 'visible' )
		return true;

	return false;

}


function hide( what ) {

	s( what ).visibility = 'hidden';

}


function doLoad2( ) {

	d = document;

	if ( arguments.length == 1 )
		return;

//	s( 'adWin' ).top = '99px';
//	s( 'adWin' ).left = '86.8%';
//	s( 'adWin' ).visibility = 'visible';

	picLoaded = 1;
	picFade( );


	var jamLinks = new Array( );

	jamLinks[0] = 'http://music.globalbeatz.net/electronic-music-mp3/1156';
	jamLinks[1] = 'http://www.broadjam.com/artists/artistindex.asp?artistID=16356';
	jamLinks[2] = 'http://www.tranceaddict.com/forums/showthread.php?s=&postid=3518857';
//	jamLinks[3] = 'http://www.internetdj.com/artists.php?op=show&id=26094&genre=13';


	var jamSpan = e( 'jamSpan' );

	if ( jamSpan != null )
		jamSpan.title = jamLinks[Math.round( Math.random( ) * ( jamLinks.length - 1 ) )];


}


function toggleComments( postId ) {

	document.getElementById( postId ).className = ( document.getElementById( postId ).className == 'commentshown' ? 'commenthidden' : 'commentshown' );

}


function isIE5(){return(navigator.userAgent.indexOf("MSIE 5")>-1);}function isIE6(){return((navigator.userAgent.indexOf("MSIE 6")>-1)&&(navigator.userAgent.indexOf("Opera")==-1));}function isIE(){return(isIE5()||isIE6());}function isOpera(){return(navigator.userAgent.indexOf("Opera")>-1);}function isSafari(){return((navigator.userAgent.indexOf("Safari")>-1)&&(navigator.userAgent.indexOf("Mac")>-1));}function getPageMode(){if(document.compatMode){switch(document.compatMode){case"BackCompat":return 0;case"CSS1Compat":return 1;case"QuirksMode":return 0;}}else{if(isIE5()){return 0;}if(isSafari()){return 1;}}return 0;}function getElmId(id){return document.getElementById(id);}function createElm(tagName){return document.createElement(tagName);}function getX(e){if(!e){var e=window.event;}if(isSafari()){return(e.clientX-getScrollLeft());}else{return e.clientX;}}function getY(e){if(!e){var e=window.event;}if(isSafari()){return(e.clientY-getScrollTop());}else{return e.clientY;}}function getScrollLeft(){switch(getPageMode()){case 0:return document.body.scrollLeft;case 1:if(document.documentElement&&(document.documentElement.scrollLeft>0)){return document.documentElement.scrollLeft;}else{return document.body.scrollLeft;}}}function getScrollTop(){switch(getPageMode()){case 0:return document.body.scrollTop;case 1:if(document.documentElement&&(document.documentElement.scrollTop>0)){return document.documentElement.scrollTop;}else{return document.body.scrollTop;}}}function getClientHeight(){switch(getPageMode()){case 0:return document.body.clientHeight;case 1:if(isSafari()){return self.innerHeight;}else{if((!isOpera())&&document.documentElement&&(document.documentElement.clientHeight>0)){return document.documentElement.clientHeight;}else{return document.body.clientHeight;}}}}function getClientWidth(){switch(getPageMode()){case 0:return document.body.clientWidth;case 1:if(isSafari()){return self.innerWidth;}else{if((!isOpera())&&document.documentElement&&(document.documentElement.clientWidth>0)){return document.documentElement.clientWidth;}else{return document.body.clientWidth;}}}}

