site = "http://www.psreporter.com/psr_op.html#";
var popupwin= "";
var popup_opened = false;

games = new Array(
"Andretti Racing|AR",
"Area 51|A51|Lightgun game thats no fun",
"Ayrton Senna Kart Duel|ASKD|The Karts really feel like karts but the graphics suck.",
"Black Dawn|BD|Helicopter shooting game with awfully short horizon.",
"Bio Hazard|RE|Jap. version of Resident Evil.",
"Broken Helix|BH|3rd person view adventure game.",
"Burning Road|BR|Arcade-like racing game.",
"Bushido Blade|BB|Jap. fighting game. One hit kills.",
"Bust-A-Move 2|BAM2-notyet",
"Children of Lost City|CLC|Great graphics, horrible control. Too annoying!",
"Choro-Q|CQ|Jap. matchbox car racing. Good long term value. Gfx outdated.",
"Choro-Q3|CQ3-notyet",
"Colin McRae Rally 2.0|CMR2|The car racing game for adults. Get it now!",
"Contra Legacy of War|CLW|3D glasses or not, it still sucks!",
"Crash Bandicoot|CB|Only kids have enough patience for this. Too hard!",
"Crash Team Racing|CTR",
"D|D",
"Dare Devil Derby 3D|DDD3D",
"Death Wing|DW",
"Defcon 5|DC5",
"Descent Maximum|DM",
"Die Hard Trilogy|DHT",
"Disruptor|Dis",
"Dracula-X|DX",
"Dragonheart|DH|The worst game I\'ve ever seen on a PSX.",
"Driver|DR",
"Exhumed|Ex|Doom-like shooter with egyptian flair and warping textures.",
"Fade to Black|FB",
"Fear Effect|FE",
"Final Doom|FD",
"Formula 1|F1",
"Formula 98|F198",
"Fox Hunt|FH",
"Galaxians 3D|G3D",
"Gamera 2000|G2000",
"Gundam 2.0|GD20",
"Hyper Rally Oehlins|HRO",
"Impact Racing|IR-notyet",
"International Moto X|IMX-notyet",
"IQ Intelligent Cube|IQ",
"Jet Moto|JM-notyet",
"Jumping Flash 2|JF2",
"Kings Field II|KF2",
"Mechwarrior 2|MW2",
"Medal of Honour|MH",
"Motor Toon GP 2|MTGP2",
"Muppets Racing| MR",
"Nanotek Warrior|NW",
"NBA Live '97|NBA97",
"NBA Shootout|NBA97",
"Norse by Norsewest|NNW",
"Overblood|OB",
"Pandemonium|PM",
"Philosoma|Ph",
"Rage Racer|RR",
"Rapid Racer|Rap",
"Rally Cross|RC",
"Rayman|RM",
"Resident Evil 3|RE3",
"Return Fire|RF",
"Rockman 8|RM8",
"Runabout Climax|RUC|Very average racing with drive-everywhere-appeal",
"Sangoku Museu|SM",
"Sexy Parodius|sexy|Jap. 2D shoot\'em up with nothing sexy in it.",
"Shellshock|SHSH|Tank game with short horizon and serious attitude.",
"Silent Hill|SH",
"Smash Court Tennis|SC",
"Soul Edge|SE",
"Soviet Strike|SS",
"Spider|Spider",
"Nuclear Strike|NS-notyet|Similar to Soviet Strike, but better graphics and more vehicles.",
"Star Gladiator|SG",
"Tekken 2|TK2",
"Tekken 3|TK3",
"Tenka|Tenka|Doom-like 1st person shooter, mainly in narrow corridors.",
"Theme Park|TP",
"Time Crisis|TC-notyet",
"Tobal 2|T2",
"Tombraider|TR",
"Tombraider 3|TR3",
"Tomb Raider IV|TR4",
"Toshinden|BAT3",
"Toshinden 2|BAT3",
"Toshinden 3|BAT3",
"Twisted Metal|TW2",
"Twisted Metal 2|TW2",
"V-Rally|VR",
"V-Rally 2|VR2-notyet",
"WipeOut XL/2087|WOXL",
"Xevious 3D/G|X3D",
"Tony Hawk Proskater|THPS");

games.sort();
numgames=games.length;

function create_game_options() {
	var i = 0;
	var gamenamestr1="";
	for (i = 0 ; i < numgames; i++) {
  		gamenamestr=games[i].split("|");
  		document.write('<OPTION VALUE=\"'+gamenamestr[1]+'\">'+gamenamestr[0]);
	}
}

function notyet(str) {
    if (str.indexOf("notyet") == -1) {
          return false
    } else { 
         return true
    }
}

function isChecked(object) {
    if (object.checked) return true;
    else return false;
}


function jumptogamereview(frm, menu1) {
	with (frm) {
		str = menu1.options[menu1.selectedIndex].value;
	}
	url = site + str;
 
    if (isChecked(document.tickform.nw_checkbox)) {
			popupwin=window.open (url, 'revWin', 'scrollbars=yes,resizable=yes,toolbar=yes,status=yes,width=400,height=400'); 
			popup_opened = true;
				        
    } else {
			window.location.href = url;
	}
}

function cleanup_reviews() {
		if (popup_opened) {
			if (!popupwin.closed) {popupwin.close()}		
		}	
}

function show_description(sourceform,menu1,targetobject) {
	var str="DEFAULT";
	var gamenamestr="";
	var gamenum="0"
	var gamecomment="";
	var desc="";
       var gamecode="";

	with (sourceform) {
//		str = menu1.options[menu1.selectedIndex].value;
		gamenum=menu1.selectedIndex;
	}
	gamenamestr=games[gamenum].split("|");
       gamecode = gamenamestr[1]; 
	desc = gamenamestr[2];

	if (desc) {
	    gamecomment += desc;
	} else {
           gamecomment += "Click read review for this game"
       }
	if (notyet(gamecode)) {
		gamecomment += "\r\n(No review available at this time.)";
	} 
	targetobject.value = gamecomment;
}

function handle_readreview(frm, menu1) {
     var str = menu1.options[menu1.selectedIndex].value;
     if (notyet(str)) {
        document.tickform.tickfield.value = "No, really. There is no full review yet, apart from its short description";
     } else {
          jumptogamereview(frm, menu1)
     }
}

