if(typeof pages == "undefined") {
	pages = 6;
	}
	
if(typeof launchURL == "undefined") {
	launchURL = null;
	}
	
if(typeof target == "undefined") {
	target = "_blank";
	}

function FullscreenWindow(gotoHTML){
	if (window.screen){
		var hori=screen.availWidth;
		var verti=screen.availHeight;

	window.open(gotoHTML,'zmag'+ Math.round(1099999999*Math.random()), 'width='+hori+',height='+verti+',fullscreen=1,channelmode=1, scrollbars=1,titlebar=1,left='+(0)+',top='+(0));
}
}

linkurl = 'viewer.zmags.com';


//if(document.domain.indexOf('.com')!=-1)
//	linkurl = 'viewer.zmags.com';


//linkurl = 'www.zmags.co.uk';
//linkurl = 'www.zmag.dk';


document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">\n');
document.write('<param name="movie" value="http://' + linkurl +'/gfx/tinyMag.swf?magid='+id+'&__width='+magWidth+'&__height='+magHeight+'&numpages='+pages+'&launchURL='+launchURL+'&launchTarget='+target+'" />\n');
document.write('<param name="quality" value="high" />\n');
document.write('<param name="menu" value="false" />\n');
document.write('<param name="bgcolor" value="'+bgcolor+'" />\n');
document.write('<embed src="http://' + linkurl +'/gfx/tinyMag.swf?magid='+id+'&__width='+magWidth+'&__height='+magHeight+'&numpages='+pages+'&launchURL='+launchURL+'&launchTarget='+target+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'"></embed></object>\n');
document.write('<s' + 'cript type=\"text/javascript\" src=\"http://' + linkurl +'/js/preload.php?id=' + id+'&start=1\"></s' + 'cript>');
