function hideLoadBox(){$("#loadingBox").fadeOut(500,function(){$("#loadingBox").remove()})}function showLoadBox(a,b){if(typeof b=="undefined"){b=5e3}var c=$(a);var d=$('<div id="loadingBox" style="background-color: white; \n\ntext-align:center;">\n\n<img src="images/progress.gif" alt="Loading..." /></div>').css({position:"absolute",top:0,left:0,opacity:0,width:c.width(),height:c.height()});var e=$(a).parent("div,p");e.css("position","relative").prepend(d.hide());e.children("#loadingBox").fadeTo(500,.5);setTimeout("hideLoadBox()",b)}function errMsg(a,b){if(a==null)return;if(typeof b=="undefined")b=true;if(b==true){$("#errMessages").html(null)}$("#errMessages").prepend("<p>"+a+"</p>").show()}function clearErrMsg(){$("#errMessages").html(null).hide()}function clearInfoMsg(){$("#infoMessages").html(null).hide()}function infoMsg(a,b){if(a==null)return;if(typeof b=="undefined")b=true;if(b==true){clearInfoMsg()}$("#infoMessages").prepend("<p>"+a+"</p>").show()}function vveShowMessages(a){clearInfoMsg();if(typeof a.infomsg=="object"){for(var b=0;b<a.infomsg.length;b++){infoMsg(a.infomsg[b],false)}}else if(typeof a.infomsg=="string"){infoMsg(a.infomsg)}clearErrMsg();if(typeof a.errmsg=="object"){for(var c=0;c<a.errmsg.length;c++){errMsg(a.errmsg[c],false)}}else if(typeof a.infomsg=="string"){errMsg(a.errmsg)}}function setCookie(a,b,c,d,e,f){var g=new Date;g.setTime(g.getTime());if(c){c=c*1e3*60*60*24}var h=new Date(g.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+h.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(f?";secure":"")}function showPopup(a,b){$("#"+a).fadeIn().css({width:Number(b)}).prepend('<a href="#" class="close"><img src="/images/close_popup.png" class="btn_close" title="Close Window" alt="Close" /></a>');var c=($("#"+a).height()+80)/2;var d=($("#"+a).width()+80)/2;$("#"+a).css({"margin-top":-c,"margin-left":-d});$("body").append('<div id="fade"></div>');$("#fade").css({filter:"alpha(opacity=80)"}).fadeIn();$("a.close, #fade").click(function(){$("#fade, .popup_block").fadeOut(function(){$("#fade, a.close").remove()});return false})}function fadeInImages(a,b){$(a+" img:gt(0)").hide();setInterval(function(){$(a+" :first-child").fadeOut().next("img").fadeIn().end().appendTo(a)},b)}
