var GB_DONE=false;var GB_HEIGHT=400;var GB_WIDTH=400;var GB_ANIMATION=true;function GB_show(caption,url,height,width){GB_HEIGHT=height||400;GB_WIDTH=width||400;if(!GB_DONE){$(document.body).append("<div id='gb_overlay'></div><div id='gb_window'><div id='gb_caption'></div>"+"<div id='gb_close'></div></div>");$("#gb_close").click(GB_hide);$("#gb_overlay").click(GB_hide);$(window).resize(GB_position);GB_DONE=true;}$("#gb_frame").remove();$("#gb_window").append("<iframe id='gb_frame' frameBorder='0' src='"+url+"'></iframe>");$("#gb_caption").html(caption);$("#gb_overlay").show();GB_position();if(GB_ANIMATION){$("#gb_window").slideDown("slow");}else{$("#gb_window").show();}}function GB_hide(){$("#gb_window,#gb_overlay").hide();}function GB_position(){var de=document.documentElement;var w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;$("#gb_window").css({width:GB_WIDTH+"px",height:GB_HEIGHT+"px",left:((w-GB_WIDTH)/2)+"px"});$("#gb_frame").css("height",GB_HEIGHT+"px");}
