/*function ShowPic(url,title,x1,y1) {

	window.open('image.php?i='+url+'&t='+title+'', 'MyWin', 'top=100,left=100,width=' + x1 + ', height=' + y1 + '');
}*/
function detect() {
if (navigator.appName == 'Microsoft Internet Explorer' && navigator.platform == 'MacPPC') {
return true;
} else {
return false;
}
}
function ShowPic(URLtoOpen, title, popwidth, popheight) {
var Macit = detect();
var screenWidth = screen.availWidth;
var screenHeight = screen.availHeight;
var x = (screenWidth/2)-(popwidth/2);
var y = (screenHeight/2)-(popheight/2);
if (Macit == 1) {
popwidth2 = popwidth - 16;
popheight2 = popheight - 16;
} else {
popwidth2 = popwidth;
popheight2 = popheight;
}
var winParams = "height=" + popheight2 + ",width=" + popwidth2 +",resizable=0,directories=0,dependent=1,toolbar=0,scrollbar=0,toolbar=0,screenX=" + x + ",screenY=" + y + ",left=" + x + ",top=" + y;
newWindow = window.open('image.php?i='+URLtoOpen,'_blank', winParams);
}


function ShowPic2(img, title, popwidth, popheight, inf) {
inf=(inf==undefined) ? 0 : inf;
var Macit = detect();
var screenWidth = screen.availWidth;
var screenHeight = screen.availHeight;
var x = (screenWidth/2)-(popwidth/2);
var y = (screenHeight/2)-(popheight/2);
if (Macit == 1) {
popwidth2 = popwidth - 16;
popheight2 = popheight - 16;
} else {
popwidth2 = popwidth;
popheight2 = popheight;
}
var winParams = "height=" + popheight2 + ",width=" + popwidth2 +",resizable=no,directories=0,dependent=1,toolbar=0,scrollbar=0,toolbar=0,screenX=" + x + ",screenY=" + y + ",left=" + x + ",top=" + y;
newWindow = window.open('img.php?img='+img+'&info='+inf,'_blank', winParams);
}


function flashControl(SRC,WIDTH,HEIGHT,FLASHVARS,WMODE,BGCOLOR) {

	while ( FLASHVARS.search(' ') != -1 ) {
		FLASHVARS = FLASHVARS.replace(' ', '%20');
	}

	document.write('<object type="application/x-shockwave-flash" data=' + SRC+ ' width=' + WIDTH + ' height=' + HEIGHT + '>');
	document.write('<!--[if IE]><param name="movie" value=' + SRC+ '>< ![endif]-->');

	if ( FLASHVARS ) { document.write('<param name="flashvars" value=' + FLASHVARS + '>'); }
	if ( WMODE ) { document.write('<param name="wmode" value=' + WMODE + '>'); }
	if ( BGCOLOR ) { document.write('<param name="bgcolor" value=' + BGCOLOR + '>'); }

        document.write('<param name="quality" value="high">');
	document.write('<\/object>');
}
function openNewWindow(URLtoOpen, windowName, windowFeatures) { NewWindow=window.open(URLtoOpen, windowName, windowFeatures); }