// JavaScript Document
function parseHTMLArgs(){
	if( document.location.search.length > 0 )
	{
		//skip the '?'
		args = parseArgs(document.location.search.substring(1));

		return args;
	}
	else return "";
}

function parseArgs(string){
	var args = new Object();
	var pairs = string.split("&");
		
	for(var i = 0; i < pairs.length; i++)
	{
		// Look for "name=value"
		var pos = pairs[i].indexOf('='); 
		// if not found, skip to next
		if (pos == -1) continue; 
		// Extract the name
		var argname = pairs[i].substring(0,pos); 
	
		// Extract the value
		var value = unescape( pairs[i].substring(pos+1) );
		// Store as a property
		args[argname] = value; 
	
		//alert(argname + " = " + value);
	}
	return args;
}

function unsupportedFlashVersion() {
	alert("You have to install latest Macromedia Flash Player in order to browse this site.");
}

var htmlArgs = parseHTMLArgs();
var galleryId = htmlArgs["gid"]; 
var imageName = htmlArgs["file"];
var imageType = htmlArgs["type"];
var viewType = htmlArgs["private"];