// JavaScript Document

var newwindow;
function pop_open (url, height, width )
{
	newwindow=window.open(url,'Photo','height='+height+',width='+width+'location=0,status=1,scrollbars=1,toolbar=0' );
	s_width = screen.width ;
	s_height = screen.height - 50;
	
	y = (s_height - height )/2;
	x = (s_width - width)/2 ;
	
	newwindow.moveTo(x,y);
	if ( window.focus ) 
	{
		newwindow.focus()
	}
	
}

function swapImage2 ( id, photo ) 
{
	document.getElementById(id).innerHTML = '<img src="'+photo+'" />' ;
}




	intImage = 2;
	
	function swapImage( image) 
	{
		swap = document.getElementById ( image ) ;
		switch (intImage) 
		{
	 		case 1:
					  swap.src = "/images/more-photos.gif"
					  intImage = 2
					  return(false);
			case 2:
					  swap.src = "/images/close-photos.gif"
					  intImage = 1
					  return(false);
	 	}
	}
	
	
	function swapImage2( image_src, image_off, image_on ) 
	{
		swap = document.getElementById ( image_src ) ;
		switch (intImage) 
		{
	 		case 1:
					  swap.src = image_on;
					  intImage = 2;
					  return(false);
			case 2:
					  swap.src = image_off;
					  intImage = 1
					  return(false);
	 	}
	}
	


function chat_open (url, height, width )
{
	
	newwindow=window.open(url,'Chat','height='+height+',width='+width+'location=0,status=1,scrollbars=0,toolbar=0' );
	s_width = screen.width ;
	s_height = screen.height - 50;
	
	y = (s_height - height )/2;
	x = (s_width - width)/2 ;
	
	newwindow.moveTo(x,y);
	if ( window.focus ) 
	{
		newwindow.focus()
	}
	
}

function event_open (url, height, width )
{
	newwindow=window.open(url,'Outing','height='+height+',width='+width+'location=0,status=1,scrollbars=0,toolbar=0' );
	s_width = screen.width ;
	s_height = screen.height - 50;
	
	y = (s_height - height )/2;
	x = (s_width - width)/2 ;
	
	newwindow.moveTo(x,y);
	if ( window.focus ) 
	{
		newwindow.focus()
	}
	
}
