var details_window = false;
var image_details_window = false;
	
/*
function popup( id ) {
	showDetails( id );
}

function openPopup( id ) {
	showDetails( id );
}
*/

function showFileDetails( id, width, height ) {
	
	if( image_details_window ) {
		image_details_window.close();
		image_details_window = false;
	}
	
	win_url = base_url + lang + '.php/0;details;file;file_id;' + id;
	win_rnd = ( Math.round( ( Math.random() * 999 ) + 1 ) );
	win_width = width;
	win_height = height;
		
	win_top = Math.round( ( screen.availHeight - win_height ) / 2 );
	win_left = Math.round( ( screen.availWidth - win_width ) / 2 );
		
	curr_window = window;
	
	image_details_window = curr_window.open(win_url, "w"+win_rnd, "top=" + win_top +  ",left=" + win_left + ",width="+win_width+",height="+win_height+",buttons=0,scrollbars=0,location=0,menubar=0,resizable=1,status=0,directories=0,toolbar=0");

}

function showImageDetails( id, width, height ) {
	
	if( image_details_window ) {
		image_details_window.close();
		image_details_window = false;
	}
	
	win_url = base_url + lang + '.php/0;details;image;image_id;' + id;
	win_rnd = ( Math.round( ( Math.random() * 999 ) + 1 ) );
	win_width = width;
	win_height = height;
		
	win_top = Math.round( ( screen.availHeight - win_height ) / 2 );
	win_left = Math.round( ( screen.availWidth - win_width ) / 2 );
		
	curr_window = window;
	
	image_details_window = curr_window.open(win_url, "w"+win_rnd, "top=" + win_top +  ",left=" + win_left + ",width="+win_width+",height="+win_height+",buttons=0,scrollbars=0,location=0,menubar=0,resizable=1,status=0,directories=0,toolbar=0");

}

function showDetails( id ) {
	
	if( details_window ) {
		details_window.close();
		details_window = false;
	}
		
	win_url = base_url + lang + '.php/' + id + ';details;main';
	win_rnd = ( Math.round( ( Math.random() * 999 ) + 1 ) );
	win_width = 500;
	win_height = 450;
		
	win_top = Math.round( ( screen.availHeight - win_height ) / 2 );
	win_left = Math.round( ( screen.availWidth - win_width ) / 2 );
		
	curr_window = window;
	
	details_window = curr_window.open(win_url, "w"+win_rnd, "top=" + win_top +  ",left=" + win_left + ",width="+win_width+",height="+win_height+",buttons=0,scrollbars=0,location=0,menubar=0,resizable=1,status=0,directories=0,toolbar=0");
}
	
function changeLang( lang ) {
	document.location.replace( base_url + 'flash.' + lang + '.php' );
}

function showMail( mail ) {
	window.location.href = mail;
}

function gmn_site_DoFSCommand(command, args) {
	eval( command + "( '" + args + "' );" );
}
	
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub gmn_site_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call gmn_site_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}