
var flashvars = {};
var params = {};
params.menu = "false";
params.quality = "high";
params.scale = "exactfit";
params.wmode = "transparent";
params.allowfullscreen = "true";
params.allowscriptaccess = "always";
var attributes = {id:'flashcontent', name:'flashcontent'};
swfobject.embedSWF("/wp-content/themes/gazette/index.swf", "flashcontent", "310", "260", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

function decode(s) {
	try {
		return decodeURIComponent(s).replace(/\r\n|\r|\n/g, "\r\n");
	} catch (e) {
		return "";
	}
}
function getQueryString(win) {
	var qs = win.location.search;
	var multimap = {};
	if (qs.length > 1) {
		qs = qs.substr(1);
		qs.replace(/([^=&]+)=([^&]*)/g, function(match, hfname, hfvalue) {
			var name = decode(hfname);
			var value = decode(hfvalue);
			if (name.length > 0) {
				if (!multimap.hasOwnProperty(name)) {
					multimap[name] = [];
				}
				multimap[name].push(value);
			}
		});
	}
	return multimap;
}

function popit(){				
	window.open("/wp-content/themes/gazette/watchingyourback.html", "", "width=310px, height=260px, screenX=200, screenY=100, left=2000, top=100", true);	
}

function executeJpg(){
		
	if(thediv.style.display == "none"){
		thediv.style.display = "";
		thediv.innerHTML = "<table width='100%' height='100%'><tr><td align='center' valign='middle' width='100%' height='100%'><img src='email01.jpg' /><br><a href='#' onclick='return execute();'></a></td></tr></table>";
	}else{
		thediv.style.display = "none";
		thediv.innerHTML = '';
	}
	
	return false;

}

function execute(i){
	
	window.moveTo(1,1);
	
	if(screen.width > 1500){
		window.resizeTo(1500, screen.height);	// 1280, 1024
	}
	else{
		window.resizeTo(screen.width, screen.height);	
	}
	
	var thediv=document.getElementById('displaybox');
	var swfFile = "";
	switch(i)
	{
		case 0: swfFile = "document"; break;
		case 1: swfFile = "spreadsheet"; break;
		case 2: swfFile = "error"; break;
		case 3: swfFile = "presentation"; break;
		case 4: swfFile = "email"; break;
		case 5: swfFile = "desktop"; break;
		case 6: swfFile = "website"; break;
		case 7: swfFile = "filetransfer"; break;
		default: swfFile = "email";
	}
	swfFile = "screens/" + swfFile;
	thediv.style.display = ( i >= 0 ) ? "": "none";
	
	
	if(thediv.style.display == "none") {
		thediv.innerHTML = '';
	}
	else {
		document.body.overflow = "hidden";
		
		thediv.innerHTML = "<table width='100%' height='100%'><tr><td align='left' valign='top' width='100%' height='100%'><a href='#' onclick='return execute();'><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='1500' HEIGHT='1000' id='"+swfFile+".swf' ALIGN='left'><PARAM NAME=movie VALUE='/wp-content/themes/gazette/"+swfFile+".swf'> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#ffffff> <EMBED src='/wp-content/themes/gazette/"+swfFile+".swf' quality=high bgcolor=#ffffff WIDTH='1500' HEIGHT='1000' NAME='email01' ALIGN='left' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED> </OBJECT></a></td></tr></table>";
	}
	return false;

}
