/* ======================================== \
// Package: Mihalism Multi Host
// Version: 5.0.0
// Copyright (c) 2007, 2008, 2009 Mihalism Technologies
// License: http://www.gnu.org/licenses/gpl.txt GNU Public License
// LTE: 1250740434 - Wednesday, August 19, 2009, 11:53:54 PM EDT -0400
// ======================================= */

var page_url=location.href;var RecaptchaOptions={theme:'white'};preload_image("css/images/site_logo.jpg",970,140);preload_image("css/images/main_bg.png",120,450);preload_image("css/images/blue_box_bg.gif",12,110);preload_image("css/images/input_bg.gif",30,25);preload_image("css/images/nav_mem_bar.gif",1,30);preload_image("css/images/pc_foot_bg.gif",6,25);preload_image("css/images/progress_bar.gif",32,32);preload_image("css/images/tbl_foot_bg.gif",8,38);preload_image("css/images/tbl_top_bg.gif",8,25);preload_image("css/images/bxlayout_prev.png",500,462);preload_image("css/images/stdlayout_prev.png",500,283);function preload_image(path,width,height){if(document.images){image_file=new Image(width,height);image_file.src=path;}}function google_stats(id){var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));try{var pageTracker=_gat._getTracker(id);pageTracker._trackPageview();}catch(err){}}function get_ajax_content(theurl){return $.ajax({url:theurl,async:false,type:"GET"}).responseText;}function gallery_action(act,id,value){switch(act){case"select":$("input[name=userfile]").each(function(){this.checked=((this.checked==1)?0:1);});break;case"rename":var current_title=$("span[id="+id+"]").html();$("span[id="+id+"]").toggle();$("input[id="+id+"_rename]").toggle();$("input[id="+id+"_rename]").val(current_title);$("input[id="+id+"_rename]").focus();$("input[id="+id+"_rename]").select();break;case"rename-d":var the_title=$("input[id="+value+"_title_rename]").val();var new_title=((the_title=="")?"Click to add title":the_title);var data=get_ajax_content("admin.php?act=rename_file_title&file="+id+"&title="+encodeURI(new_title));$("input[id="+value+"_title_rename]").attr("style","display: none;");$("span[id="+value+"_title]").attr("style","display: inline;");$("span[id="+value+"_title]").html(data);break;case"move":case"delete":var checkedfiles="";$("input[name=userfile]").each(function(){if(this.checked==1){checkedfiles+=(this.value+",");}});if(checkedfiles!==""){checkedfiles=checkedfiles.substr(0,(checkedfiles.length-1));toggle_lightbox("admin.php?act="+act+"_files&files="+encodeURI(checkedfiles)+"&id="+id+"&return="+encodeURIComponent(page_url),(act+"_files_lightbox"));}else{alert("Select at least one image.");}break;}return;}function center_screen(id){var elemwidth=$(id).width();var elemheight=$(id).height();var windowwidth=$(window).width();var windowheight=$(window).height();var precentuse=((elemheight/windowheight)*100);var theheight=(((windowheight-elemheight)/2)-((precentuse>50)?2.5:50));var thewidth=((windowwidth-elemwidth)/2);var finalheight=(((theheight<1)?0:theheight)+"px");var finalwidth=(((thewidth<1)?0:thewidth)+"px");return("top: "+finalheight+"; left: "+finalwidth+";");}function toggle_lightbox(url,div){if(url!=="no_url"){scroll(0,0);$("#page_body").append("<div id=\""+div+"\"></div>");var data=get_ajax_content((url+(((url.match(/\?/))?"&":"?")+"lb_div="+div+"&return="+base64_encode(page_url))));$("div[id="+div+"]").html("<div class=\"lightbox_main\">"+data+"</div>"+"<div class=\"lightbox_background\">&nbsp;</div>");$("div[class=lightbox_main]").attr("style",center_screen("div[class=lightbox_main]"));$("div[class=lightbox_background]").css("width",$(document).width());$("div[class=lightbox_background]").css("height",$(document).height());}else{$("div[id="+div+"]").remove();}return;}function check_username(){var username=$("#username_field").val();var data=get_ajax_content("admin.php?act=check_username&username="+encodeURI(username));if(data=="1"||username==""){$("#username_check").html("<img src=\"css/images/xed_out.gif\" alt=\"Username Taken\" style=\"vertical-align: -20%;\" /> <span style=\"color: #C33;\">Username Not Available.</span> - <a href=\"javascript:check_username();\">Check Again</a>");}else{$("#username_check").html("<img src=\"css/images/green_check.gif\" alt=\"Username Available\" style=\"vertical-align: -20%;\" /> <span style=\"color: #096;\">Username Available!</span> - <a href=\"javascript:check_username();\">Check Again</a>");}return;}function highlight(field){field.focus();field.select();return;}function toggle(id){$("#"+id).toggle();return;}