var gallery=undefined;var DarkStarPGallery=new Class({Implements:[Options],options:{fty:[".jpg",".gif",".png","jpeg"],imageLinkClass:"hiFur_gEntryA",ttClass:"hiFur_gtitle"},nc:function(){hiFur.blank();hiFur.setP("/usrc/modules/photos/newcat.php")},chckp:function(){ftype=$("filename").value.substring(($("filename").value.length)-4).toLowerCase();if(this.options.fty.contains(ftype)==true){hiFur.oae.validate("/usrc/modules/photos/chkp.php","newPhotoForm","gallery.prnP")}else{alert("Can't upload:\nPhotos must be in .jpeg, .jpg, .gif or .png format.");return false}},prnP:function(a){value=hiFur.oae.r[a];if(value==1){$("newPhotoForm").submit();$("form").fade("out");$("uploading").setStyle("display","block")}else{if(value==0){$("invalid").innerHTML="Invalid Photo Name"}}},np:function(){hiFur.blank();hiFur.setP("/usrc/modules/photos/newp.php");(function(){$("popup_data").tween("width","600px")}).delay(500)},crt:function(){$("invalid").innerHTML="";if($("gname").value==""){alert("Name must not be blank!");return false}hiFur.oae.validate("/usrc/modules/photos/chkn.php","newCatForm","gallery.prnT");return false},ulerr:function(a){if(a=="size"){alert("Your file was too large. Please reduce the size and try again.")}if(a=="dir"){alert("Internal error while creating UPHT directories. Please contact support.")}if(a=="full"){alert("Server is stuffed full! Please contact support.")}hiFur.blank("t")},uok:function(){location=window.location},prnT:function(a){value=hiFur.oae.r[a];if(value==1){hiFur.oae.start("/usrc/modules/photos/crtn.php","popup_data","newCatForm",false,"location.reload()")}else{if(value==0){$("invalid").innerHTML="Invalid Gallery Name"}}},del:function(a){if(confirm("Are you SURE you wish to delete this image?\nYou cannot undo this action.")){sd=hiFur.oae.rs(8);Cookie.write("_dfd_id",sd,{path:"/"});(function(){hiFur.oae.start("/uops/photos/d.php?sd="+sd+"&iid="+a,"_noelement",false,false,"gallery.back")}).delay(1000,this)}return false},favo:function(a,b){hiFur.oae.start_async("/uops/art/fav.php?i="+a+"&re="+b,this.favoDone,this)},favoDone:function(a){$("flink").fade("hide");$("flink").set("html","&#160;<strong>Favourite changed!</strong>");$("flink").fade("in")},edit:function(a){hiFur.setP("/uops/photos/e.php?iid="+a);hiFur.blank();return false},back:function(){location.href="../"},initialize:function(b){this.setOptions(b);var a=new Tips($$("."+this.options.imageLinkClass),{className:this.options.ttClass,offsets:{x:16,y:100}});$$(".hiFur_gimg").addEvent("mouseenter",function(){sz=this.getSize();this.set("morph",{duration:"normal",transition:"sine:in"});if(sz.x>sz.y){this.morph({width:250})}else{this.morph({height:250})}});$$(".hiFur_gimg").addEvent("mouseleave",function(){sz=this.getSize();this.set("morph",{duration:"normal",transition:"sine:out"});if(sz.x>sz.y){this.morph({width:90})}else{this.morph({height:90})}})}});window.addEvent("domready",function(){gallery=new DarkStarPGallery()});