function popUp(URL, TITLE) {
	//Calculate the center of screen
	/* Due to different browser naming of certain key global variables, we need to do three different tests to determine their values */

	// Determine how much the visitor had scrolled

	var scrolledX, scrolledY;
	if( self.pageYOffset ) {
 	 	scrolledX = self.pageXOffset;
 	 	scrolledY = self.pageYOffset;
	} else if( document.documentElement && document.documentElement.scrollTop ) {
  		scrolledX = document.documentElement.scrollLeft;
  		scrolledY = document.documentElement.scrollTop;
	} else if( document.body ) {
  		scrolledX = document.body.scrollLeft;
  		scrolledY = document.body.scrollTop;
	}

	// Determine the coordinates of the center of browser's window

	var centerX, centerY;
	if( self.innerHeight ) {
  		centerX = self.innerWidth;
  		centerY = self.innerHeight;
	} else if( document.documentElement && document.documentElement.clientHeight ) {
  		centerX = document.documentElement.clientWidth;
 		centerY = document.documentElement.clientHeight;
	} else if( document.body ) {
  		centerX = document.body.clientWidth;
  		centerY = document.body.clientHeight;
	}

  	var leftOffset = scrolledX + (centerX - 250) / 2;
  	var topOffset = scrolledY + (centerY - 200) / 2;

	//var ScreenWidth=window.screen.width;
	//var ScreenHeight=window.screen.height;

	//placementx=(ScreenWidth/2)-(320/2);
	//placementy=100;  
	//placementy=(ScreenHeight/2)-(328/2);
	
	//Change Styles
	document.getElementById("box1").style.display="block";
	document.getElementById("box1").style.position= "absolute";
	document.getElementById("box1").style.top = topOffset + "px";
	document.getElementById("box1").style.left = leftOffset + "px";	
		
	// Fetch the movie
	//var html = '<span onmousedown="dragStart(event,\'box1\')">';
	var html = '<img src="/images/nowplaying.jpg">';
	html = html + '<br>' + TITLE + '<br>';

	//html = html + '<embed src="'+ URL +'" type="application/x-mplayer2 "';
	//html = html + 'pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" ';
	//html = html + 'loop="false" quality="high" bgcolor="#000000" width="320" height="280" ';
	//html = html + 'id="blogVid" allowScriptAccess="sameDomain" AUTOSTART="true" ShowControls="0" ShowDisplay="0" ShowStatusBar="1"></embed>';
	
	html = html + '<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="blogVid" width="320" height="260">';
	html = html + '<param name="url" value="'+ URL +'" />';
	html = html + '<param name="src" value="'+ URL +'" />';
	html = html + '<param name="showcontrols" value="false" />';
  	html = html + '<param name="autostart" value="true" />';
	html = html + '<param name="loop" value="false" />';
	html = html + '<!--[if !IE]>-->';
	html = html + '<object type="video/x-ms-wmv" data="'+ URL +'" width="320" height="260" id="blogVid">';
	html = html + '<param name="src" value="'+ URL +'" />';
	html = html + '<param name="autostart" value="true" />';
	html = html + '<param name="controller" value="true" />';
	html = html + '<param name="loop" value="false" />';
	html = html + '</object>';
	html = html + '<!--<![endif]-->';
	html = html + '</object>';
	html = html + '<br><a href="#" onClick="javascript:hide(); return false;"><img src="http://www.imaginarypaper.com/images/closeWin.jpg" border="0"></a>';
	// document.write(html);
	document.getElementById("box1").innerHTML = html;
}
function popUp2(URL, TITLE) {
	//Calculate the center of screen
	/* Due to different browser naming of certain key global variables, we need to do three different tests to determine their values */

	// Determine how much the visitor had scrolled

	var scrolledX, scrolledY;
	if( self.pageYOffset ) {
 	 	scrolledX = self.pageXOffset;
 	 	scrolledY = self.pageYOffset;
	} else if( document.documentElement && document.documentElement.scrollTop ) {
  		scrolledX = document.documentElement.scrollLeft;
  		scrolledY = document.documentElement.scrollTop;
	} else if( document.body ) {
  		scrolledX = document.body.scrollLeft;
  		scrolledY = document.body.scrollTop;
	}

	// Determine the coordinates of the center of browser's window

	var centerX, centerY;
	if( self.innerHeight ) {
  		centerX = self.innerWidth;
  		centerY = self.innerHeight;
	} else if( document.documentElement && document.documentElement.clientHeight ) {
  		centerX = document.documentElement.clientWidth;
 		centerY = document.documentElement.clientHeight;
	} else if( document.body ) {
  		centerX = document.body.clientWidth;
  		centerY = document.body.clientHeight;
	}

  	var leftOffset = scrolledX + (centerX - 250) / 2;
  	var topOffset = scrolledY + (centerY - 200) / 2;

	//var ScreenWidth=window.screen.width;
	//var ScreenHeight=window.screen.height;

	//placementx=(ScreenWidth/2)-(320/2);
	//placementy=100;  
	//placementy=(ScreenHeight/2)-(328/2);
	
	//Change Styles
	document.getElementById("box1").style.display="block";
	document.getElementById("box1").style.position= "absolute";
	document.getElementById("box1").style.top = topOffset + "px";
	document.getElementById("box1").style.left = leftOffset + "px";	
		
	// Fetch the movie
	//var html = '<img src="http://www.imaginarypaper.com/images/nowplaying.jpg" onmousedown="dragStart(event)">';
	var html = '<img src="http://www.imaginarypaper.com/images/nowplaying.jpg">';
	html = html + '<br>' + TITLE + '<br>';
	html = html + '<embed src="'+ URL +'" ';
	html = html + 'pluginspage="pluginspage="http://www.apple.com/quicktime/" ';
	html = html + 'loop="false" quality="high" bgcolor="#000000" width="320" height="280" ';
	html = html + 'id="blogVid" allowScriptAccess="sameDomain" AUTOSTART="true" ShowControls="0" ShowDisplay="0" ShowStatusBar="1"></embed>';
	html = html + '<br><a href="#" onClick="javascript:hide();  return false;"><img src="http://www.imaginarypaper.com/images/closeWin.jpg" border="0"></a>';
	//alert(html);
	document.getElementById("box1").innerHTML = html;
}

function hide() {
	//Check if we're using an IE Browser
	//if (navigator.appName == "Microsoft Internet Explorer")
	//	document.getElementById("blogVid").Stop();
	
	if (document.blogVid)
	if (typeof document.blogVid.Stop == 'function')
	{
		document.blogVid.Stop();
	}
	// Call stop function if available in Media player
	if (document.blogVid)
	if (typeof document.blogVid.controls == 'object')
	{
		document.blogVid.controls.Stop();
	}

 	document.getElementById("box1").style.display = "none";
}
function hide2() {
 	document.getElementById("box1").style.display = "none";
}
/*
Gradual-Highlight Image Script II- 
By J. Mark Birenbaum (birenbau@ugrad.cs.ualberta.ca)
Permission granted to Dynamicdrive.com to feature script in archive
For full source to script, visit http://dynamicdrive.com
*/

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
 * destop - destination transparency level (ie 80, for mostly solid)
 * rate   - time in milliseconds between trasparency changes (best under 100)
 * delta  - amount of change each time (ie 5, for 5% change in transparency)
 */

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
function artPopUp(URL, TITLE, COMMENT) {
	// Fetch the image
	var html = '<img src="' + URL + '" border="0" alt="' + COMMENT + '"><p align="center">' + COMMENT + '</p>';
	document.getElementById("box2").innerHTML = html;
}

