function jzjspO(){


    this.puzList="6_piece_classic|12_piece_zigzag|16_piece_blocks|20_piece_classic|20_piece_birds|22_piece_wavy|22_piece_polygons|32_piece_round|35_piece_jigzone|40_piece_birds|41_piece_tetris|44_piece_tri_dove|48_piece_USA|48_piece_euros|48_piece_classic|50_piece_circles|50_piece_tri_clip|51_piece_crazy|51_piece_CD|55_piece_sixstar|62_piece_tetris|67_piece_classic|70_piece_bulbs|79_piece_stars|79_piece_bricks|80_piece_classic|87_piece_crazy|91_piece_lizards|96_piece_triangles|100_piece_classic|108_piece_swirls|184_piece_crazy|240_piece_squares";

    this.options="L";
    this.shape="48_piece_classic";
    this.popup="popup.html";
    this.popWidth=136;
    this.morepics="";
    this.bN=navigator.appName;
    
    this.bV=parseInt(navigator.appVersion);
    this.bVm=parseFloat(navigator.appVersion);
    this.bA=navigator.userAgent.toLowerCase();
    this.bMac=(this.bA.indexOf("mac")!=-1);
    this.bZ=(this.bN=='Microsoft Internet Explorer'&&(this.bV>=4)&&!this.bMac);
    this.bJxjar=(this.bN=='Netscape'&& this.bVm < 4.7) || this.bMac;
    this.bfOn=(this.bN=='Microsoft Internet Explorer'&&(this.bV>=4)&&!this.bMac);
    this.wPc=95;
    this.wPcFixed=90;
    this.height=450;
    this.NS4=document.layers;
    if (this.NS4){
	this.origWidth=innerWidth;
	this.origHeight=innerHeight;
    }
    this.lastWidth=0;
    
    this.noJava="<H3>&nbsp<BR>&nbsp &nbspThe Jigsaw requires a Java enabled browser</H3>";
    this.getPuzzle=jzjspGetPuzzle;
    this.getWidth=jzjspGetWidth;
    this.onresize=jzjspResize;
    
    this.postcard=_jzjspPostcard;
    this.faqs=_jzjspFAQs;
    this.subscribe=_jzjspSubscribe;
    this.help=_jzjspHelp;
    this.launch=_jzjspLaunch;
    this.wic=_jzjspWic;
}
function jzjspGetPuzzle(){
    if (!this.picture){
	return '<HR width="80%"><H2>This puzzle is no longer available</H2><HR width="80%">';
    }
    var a=(this.bJxjar)?'':'archive="JigZone.jar" ';
    var g=(this.gallery)?('&g='+this.gallery):'';
    var f='';
    var b='';
    if (this.bfOn){
	elabel=escape(this.label);
	ename=escape(this.aName);
	this.popup+="?z="+this.shape+"&mk="+this.mk+"&ak="+this.ak+"&ik="+this.ik+"&it="+this.it+"&LA="+elabel+"&aName="+ename;
	this.options+="F";
	b='<i style="position:relative">';
	f='<div id="jzjspFo" style="position:absolute;visibility:hidden;top:0;left:0;width:'+this.popWidth+';height:352;zIndex:-1;"><iframe style="width:'+this.popWidth+'; height:351;" src="'+this.popup+'" frameBorder=0 marginHeight=0 marginWidth=0 scrolling=no></iframe></div></i>';
    }
    var h=b + '<APPLET code="JigZone.class" codeBase="http://www.jigzone.com/" height="'+this.height+'" name="jzjspJ" width="'+this.getWidth()+'" '+a+'id="jzjspJ" MAYSCRIPT><PARAM NAME="puzzlestart" VALUE="'+this.shape+'"><PARAM NAME="options" VALUE="'+this.options+'"><PARAM NAME="picture1" VALUE="'+this.picture+'"><PARAM NAME="date" VALUE="'+this.date+'"><PARAM NAME="MPP" VALUE="'+this.morepics+g+'">';
    if (this["copyright"]){
	h +='<PARAM NAME="copyright" VALUE="'+this.copyright+'">';
    }
    if (this["copylink"]){
	h +='<PARAM NAME="copylink" VALUE="'+this.copylink+'">';
    }
    if (this["text"]){
	h +='<PARAM NAME="text" VALUE="'+this.text+'">';
    }
    if (this["label"]){
	h +='<PARAM NAME="label" VALUE="'+this.label+'">';
    }
    h +='<PARAM NAME="puzzle" VALUE="'+this.puzList+'">'+this.noJava+'</APPLET>'+ f;
    return h;
}
function jzjspGetWidth(){
    var w=600;
    if (window["screen"]){
	sw=window.screen.availWidth;
	if (sw <=800)
	    w=sw - 38;
	else{
	    w=parseInt((sw * this.wPcFixed) / 100);
	    if (w>1100) w=1100;
	}
    }
    if (this.bZ){
	w=parseInt(document.body.clientWidth*(this.wPc)/100);
	if (w < 506)
	    w=506
    }
   
 return w - 150;
}
function jzjspResize(){
    if (this.NS4 && (innerWidth !=this.origWidth || innerHeight !=this.origHeight)) {
	location.reload();
	return;
    }
    var thide=false;
    if (this.bfOn && jzjspFo.style.visibility=="visible"){
	thide=true;
	jzjspShowFollowOn("F");
    }
    if (this.bZ){
	var w=this.getWidth();
	if (w !=this.lastWidth){
	    if (document.all.jzjspJ['alive']){
		document.all.jzjspJ.style.width=w;
		document.all.jzjspJ.setSize(w,this.height);
		
		if (document.all['jzShadow'])
		    document.all.jzShadow.style.width=w - 11;
		this.lastWidth=w;
	    }
	    else{
		setTimeout("jzjsp.onresize()", 200);
	    }
	}
    }
    if (thide){
	jzjspShowFollowOn("T");
    }
}

function _jzjspPostcard(){
    var t="0:00";
    var z=jzjsp.shape;
    if (this.bA.indexOf("mac")==-1){
	z=document.jzjspJ.getShape();
	t=document.jzjspJ.getTime();
    }
    document.location.href="http://www.jigzone.com/mpc/new.php?ij=T&z="+z+"&st="+escape(t)+"&mk="+jzjsp.mk+"&ak="+jzjsp.ak+"&ik="+jzjsp.ik+"&it="+jzjsp.it+"&LA="+escape(jzjsp.label);
}
function _jzjspFAQs(){
    this.launch("indexpage/faq.htm","JZQ",this.wic(400,560));
}
function _jzjspSubscribe(){
    this.launch("indexpage/subscribe.php","JZS",this.wic(400,560));
}
function _jzjspFeed(){
    this.launch("ms/feedback.php","JZF",this.wic(400,560));
}
function _jzjspHelp(){
    this.launch("indexpage/help.htm","JZH",this.wic(400,560));
}

function _jzjspLaunch(file, name, features){
    var dom="http://www.jigzone.com/";
    if (document.location.host=="abennie"){
	dom="http://www.jigzone.com/";
    }
    if (this.bV>=4) {
	window.open(dom+file, name, features);
    } else{
	window.location.href=dom+file;
    }
}

function _jzjspWic(h,w){
    var myTop=50;
    var myLeft=50;
    if (window["screen"]){
	var ah=window.screen.availHeight;
	if (h > (ah - 80))
	    h=ah - 80;
	var myTop=(ah - h)/2;
	var myLeft=(window.screen.availWidth - w)/2;
    }
    else
	h=400;
    return "top="+myTop+",left="+myLeft+",height="+h+",width="+w+"dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=0,zlock=1";
}
function jzjspLoad(){
    setTimeout("jzjspOnResize()", 200);
}
function jzjspOnResize(){
    jzjsp.onresize();
}
function jzjspPop(show){
    setTimeout("jzjspShowFollowOn('"+show+"')", 500);
}
function jzjspShowFollowOn(show){
    var yA=document.all.jzjspJ.offsetTop;
    var xA=document.all.jzjspJ.offsetLeft;
    var cxA=document.all.jzjspJ.offsetWidth;
    jzjspFo.style.left=xA + cxA - jzjspFo.offsetWidth - 1;
    if (show!="T")
	jzjspFo.style.left=0;
    jzjspFo.style.top=yA;
    jzjspFo.style.zIindex=10;
    jzjspFo.style.visibility=(show=="T"? "visible" : "hidden");
}
jzjsp=new jzjspO();
onresize=jzjspOnResize;


if (window['jzjsp']){
	jzjsp.date='3b0d640f';
	jzjsp.label='Yoseif\'s Boxster';
	jzjsp.picture='p/up/1g/mw/hk8/25cj.jpg';
	jzjsp.aName='My Puzzle Album';
	jzjsp.shape='67_piece_classic';
	jzjsp.id='';
	jzjsp.a='';
	jzjsp.mk='68216';
	jzjsp.ak='22760';
	jzjsp.ik='100243';
	jzjsp.it='jpg';
	jzjsp.morepics='&amp;ui=68216a22760';
}
