var tb_pathtoimage="images/loadinganimation.gif";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgloader=new image();imgloader.src=tb_pathtoimage;});function tb_init(domchunk){$(domchunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});} function tb_show(caption,url,imagegroup){try{if(typeof document.body.style.maxheight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getelementbyid("tb_hideselect")===null){$("body").append("
");$("#tb_overlay").click(tb_remove);}}else{if(document.getelementbyid("tb_overlay")===null){$("body").append("
");$("#tb_overlay").click(tb_remove);}} if(tb_detectmacxff()){$("#tb_overlay").addclass("tb_overlaymacffbghack");}else{$("#tb_overlay").addclass("tb_overlaybg");} if(caption===null){caption="";} $("body").append("
");$('#tb_load').show();var baseurl;if(url.indexof("?")!==-1){baseurl=url.substr(0,url.indexof("?"));}else{baseurl=url;} var urlstring=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urltype=baseurl.tolowercase().match(urlstring);if(urltype=='.jpg'||urltype=='.jpeg'||urltype=='.png'||urltype=='.gif'||urltype=='.bmp'){tb_prevcaption="";tb_prevurl="";tb_prevhtml="";tb_nextcaption="";tb_nexturl="";tb_nexthtml="";tb_imagecount="";tb_foundurl=false;if(imagegroup){tb_temparray=$("a[rel="+imagegroup+"]").get();for(tb_counter=0;((tb_counter  next >";}else{tb_prevcaption=tb_temparray[tb_counter].title;tb_prevurl=tb_temparray[tb_counter].href;tb_prevhtml="  < prev";}}else{tb_foundurl=true;tb_imagecount="image "+(tb_counter+1)+" of "+(tb_temparray.length);}}} imgpreloader=new image();imgpreloader.onload=function(){imgpreloader.onload=null;var pagesize=tb_getpagesize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imagewidth=imgpreloader.width;var imageheight=imgpreloader.height;if(imagewidth>x){imageheight=imageheight*(x/imagewidth);imagewidth=x;if(imageheight>y){imagewidth=imagewidth*(y/imageheight);imageheight=y;}}else if(imageheight>y){imagewidth=imagewidth*(y/imageheight);imageheight=y;if(imagewidth>x){imageheight=imageheight*(x/imagewidth);imagewidth=x;}} tb_width=imagewidth;tb_height=imageheight;$("#tb_window").append(""+caption+""+"
"+caption+"
"+tb_imagecount+tb_prevhtml+tb_nexthtml+"
close
");$("#tb_closewindowbutton").click(tb_remove);if(!(tb_prevhtml==="")){function goprev(){if($(document).unbind("click",goprev)){$(document).unbind("click",goprev);} $("#tb_window").remove();$("body").append("
");tb_show(tb_prevcaption,tb_prevurl,imagegroup);return false;} $("#tb_prev").click(goprev);} if(!(tb_nexthtml==="")){function gonext(){$("#tb_window").remove();$("body").append("
");tb_show(tb_nextcaption,tb_nexturl,imagegroup);return false;} $("#tb_next").click(gonext);} document.onkeydown=function(e){if(e==null){keycode=event.keycode;}else{keycode=e.which;} if(keycode==27){tb_remove();}else if(keycode==190){if(!(tb_nexthtml=="")){document.onkeydown="";gonext();}}else if(keycode==188){if(!(tb_prevhtml=="")){document.onkeydown="";goprev();}}};tb_position();$("#tb_load").remove();$("#tb_imageoff").click(tb_remove);$("#tb_window").css({display:"block"});};imgpreloader.src=url;}else{var querystring=url.replace(/^[^\?]+\??/,'');var params=tb_parsequery(querystring);tb_width=(params['width']*1)||600;tb_height=(params['height']*1)||400;ajaxcontentw=tb_width;ajaxcontenth=tb_height-5;if(url.indexof('tb_iframe')!=-1){urlnoquery=url.split('tb_');$("#tb_iframecontent").remove();if(params['modal']!="true"){$("#tb_window").append("
"+caption+"
");}else{$("#tb_overlay").unbind();$("#tb_window").append("");}}else{if($("#tb_window").css("display")!="block"){if(params['modal']!="true"){$("#tb_window").append("
"+caption+"
close or esc key
");}else{$("#tb_overlay").unbind();$("#tb_window").append("
");}}else{$("#tb_ajaxcontent")[0].style.width=ajaxcontentw+"px";$("#tb_ajaxcontent")[0].style.height=ajaxcontenth+"px";$("#tb_ajaxcontent")[0].scrolltop=0;$("#tb_ajaxwindowtitle").html(caption);}} $("#tb_closewindowbutton").click(tb_remove);if(url.indexof('tb_inline')!=-1){$("#tb_ajaxcontent").append($('#'+params['inlineid']).children());$("#tb_window").unload(function(){$('#'+params['inlineid']).append($("#tb_ajaxcontent").children());});tb_position();$("#tb_load").remove();$("#tb_window").css({display:"block"});}else if(url.indexof('tb_iframe')!=-1){tb_position();if($.browser.safari){$("#tb_load").remove();$("#tb_window").css({display:"block"});}}else{$("#tb_ajaxcontent").load(url+="&random="+(new date().gettime()),function(){tb_position();$("#tb_load").remove();tb_init("#tb_ajaxcontent a.thickbox");$("#tb_window").css({display:"block"});});}} if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keycode;}else{keycode=e.which;} if(keycode==27){tb_remove();}};}}catch(e){}} function tb_showiframe(){$("#tb_load").remove();$("#tb_window").css({display:"block"});} function tb_remove(){$("#tb_imageoff").unbind("click");$("#tb_closewindowbutton").unbind("click");$("#tb_window").toggle(1000,function(){$('#tb_window,#tb_overlay,#tb_hideselect').trigger("unload").unbind().remove();});$("#tb_load").remove();if(typeof document.body.style.maxheight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","");} document.onkeydown="";document.onkeyup="";return false;} function tb_position(){$("#tb_window").css({marginleft:'-'+parseint((tb_width/2),10)+'px',width:tb_width+30+'px'});if(!(jquery.browser.msie&&jquery.browser.version<7)){$("#tb_window").css({margintop:'-'+parseint((tb_height/2),10)+'px'});}} function tb_parsequery(query){var params={};if(!query){return params;} var pairs=query.split(/[;&]/);for(var i=0;i"950"){ if($(showwidth).attr("src").indexof("_m=mod_product&_a=admin_list")>0){ $(obj).css('margin-top','-552px'); }else if($(showwidth).attr("src").indexof("_m=mod_article&_a=admin_list")>0){ $(obj).css('margin-top','-352px'); }else{ tb_position(); } } }