/*Copyright (c) 2007, Enterprise File System Inc. All rights reserved.*/
if(typeof SO=="undefined"){var SO={};}SO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;++i){d=a[i].split(".");o=SO;for(j=(d[0]=="SO")?1:0;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}return o;};
SO.isElement=function(id){return null!==document.getElementById(id);};
SO.getElement=function(id){var div=document.getElementById(id);if(div===null){alert('MissingElement '+id);}return div;};
SO.reloadAsHttps=function(){var s=new String(document.location);if(0===s.indexOf('http://')){document.location="https://"+s.substr(7);}else{document.location.reload();}};
SO.reloadAsHttp=function(){var s=new String(document.location);if(0===s.indexOf('https://')){document.location="http://"+s.substr(8);}else{document.location.reload();}};
SO.twoDigits=function(s){if(s<10){return '0'+s;}return s;};
SO.array=function(){this.count=0;this.data={};};SO.array.prototype.push=function(o){this.data[this.count]=o;this.count++;return this.count-1;};SO.array.prototype.getAt=function(index){return this.data[index];};
SO.map=function(){this.objs=new Array(0);};SO.map.prototype.getAt=function(name){var currentobj;for(var i=0;i<this.objs.length;i++){currentobj=this.objs[i];if(currentobj.vName==name){return currentobj.vValue;}}return null;};SO.map.prototype.setAt = function(name, value ){for(var i=0;i<this.objs.length;i++){if(this.objs[i].vName==name){this.objs[i].vValue=value;return;}}this.objs.push({vName:name,vValue:value});};
SO.namespace("cookie");SO.cookie.SetCookie=function(name,value,expires,path,domain,secure){var cookieString=name+"="+escape(value)+((expires)?";expires="+expires.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"");document.cookie=cookieString;};SO.cookie.GetCookie=function(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}return "";};
SO.namespace("ajax");SO.ajax.requestmap=new SO.map();SO.ajax.sst=function(o,path_or_form,destination){this.obj=o;this.isDirty=false;if(typeof destination=='string'){this.destination=SO.getElement(destination);}else{this.destination=destination;}if(typeof path_or_form=='string'){this.form=null;this.path=path_or_form;}else{this.form=path_or_form;this.path=null;}this.reload();};SO.ajax.sst.prototype.reload=function(){var cObj;if(this.form!==null){this.bUpload=(this.form.enctype==='multipart/form-data');YAHOO.util.Connect.setForm(this.form,this.bUpload);cObj=YAHOO.util.Connect.asyncRequest('POST',this.form.getAttributeNode('action').value,this.callback);}else{cObj=YAHOO.util.Connect.asyncRequest('GET',this.path,this.callback);}this.tId=this.bUpload?"Upload":cObj.tId;SO.ajax.requestmap.setAt(this.tId,this);};SO.ajax.sst.prototype.callback={upload:function(o){o.tId='Upload';this.success(o);},success:function(o){var cObj=SO.ajax.requestmap.getAt(o.tId);if(null===cObj){this.failure(o);}else{cObj.destination.innerHTML=o.responseText;if(cObj.obj!==null){if(typeof cObj.obj=='function'){cObj.obj(cObj.destination);}else if(typeof cObj.obj.postRender!='undefined'){cObj.obj.postRender(cObj.destination);}}}},failure:function(o){alert('Failure connecting to server');},timeout: 60000};
SO.namespace("fancyfield");SO.fancyfield.onfocus=function(field,defaultText){if(field.value==defaultText){field.value='';field.className='fancyField_active';}};SO.fancyfield.onblur=function(field,defaultText){if(field.value===''){field.value=defaultText;field.className='fancyField_default';}};SO.fancyfield.onblurUpdateUrl=function(field,defaultText,targetInputDiv,targetDefaultText){var input=SO.getElement(targetInputDiv);var val=field.value.replace(/\W/g,'').substr(0,40).toLowerCase();if(val.length>0){input.value=val;}else{input.value=targetDefaultText;}SO.fancyfield.onblur(field,defaultText);};
SO.namespace("regex");SO.regex.price=/^\d{1,8}.\d{2}$/;SO.regex.integer=/^\d{1,8}$/;SO.regex.email=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;SO.regex.host=/^([a-zA-Z0-9_\.\-])+\.([a-zA-Z0-9]{2,4})+$/;SO.regex.url=/^((http|https):\/\/)?([a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]*$/;SO.regex.string=function(min_string_length,max_string_length){return new SO.regex.string_class(min_string_length,max_string_length);};SO.regex.string_class=function(min_string_length,max_string_length){this.min_string_length=min_string_length;this.max_string_length=max_string_length;};SO.regex.string_class.prototype.test=function(s){var localString=new String(s);if(localString.length<this.min_string_length){return false;}if(localString.length>this.max_string_length){return false;}return true;};SO.regex.uri=function(max_string_length){return new SO.regex.uri_class(max_string_length);};SO.regex.uri_class=function(max_string_length){this.max_string_length = max_string_length;};SO.regex.uri_class.prototype.apply=function(s){return s.replace(/\W/g,'').substr(0,this.max_string_length).toLowerCase();};
SO.sopath='';
SO.createpanel=function(pof,id,t,b,f,w,opr){SO.currentpanel=new SO.panel(pof,id,t,b,f,w,opr);};
SO.securepanel=function(pof,id,t,b,f,w){if(SO.https){SO.currentpanel=new SO.panel(pof,id,t,b,f,w);}else{SO.cookie.SetCookie("securepanel",pof+'`'+id+'`'+t+'`'+b+'`'+f+'`'+w);SO.reloadAsHttps();}};
SO.panel=function(pof,id,t,b,f,w,opr){this.pof=pof;this.opr=opr;this.yp=new YAHOO.widget.Panel(id,{close:true,visible:true,modal:true,zindex:200,width:w,y:10,x:10,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:1}});var hd=unescape(decodeURIComponent(t));var bd=unescape(decodeURIComponent(b));var ft=unescape(decodeURIComponent(f));this.yp.setHeader(hd);this.yp.setBody(bd);this.yp.setFooter(ft);this.yp.render(document.body);this.yp.show();this.load();};
SO.panel.prototype.load=function(){var yp=this.yp;var opr=this.opr;var cb={success:function(o){yp.setBody(o.responseText);if(typeof opr=='function'){opr(yp.body);}},failure:function(o){yp.setBody('Failure connecting to server');},timeout: 60000};if(typeof this.pof=='string'){YAHOO.util.Connect.asyncRequest('GET',this.pof,cb);}else{YAHOO.util.Connect.setForm(this.pof);YAHOO.util.Connect.asyncRequest('POST',this.pof.getAttributeNode('action').value,cb);}};
SO.toggledisp=function(id){var d=SO.getElement(id);if(d!==null){if(d.style.display==='none'){d.style.display='';}else{d.style.display='none';}}};
SO.signuppr=function(el){if(SO.isElement('signup-success')){document.location.reload();}};
SO.signupeasysetuppr=function(el){if(SO.isElement('signup-success')){SO.getElement('eventwizard-continue-button').style.display='';SO.getElement('signup-contents').style.display='none';}};
SO.csst=function(f,b,e){b.disabled=true;new SO.ajax.sst(f,b.form,e);};
SO.calendar=function(id,t,container,input,cb){var cfg={title:t,navigator:true};var xdate=input.value.split('T');if(xdate.length===2){var xparts=xdate[0].split('-');cfg.pagedate=xparts[1]+'/'+xparts[0];cfg.selected=xparts[1]+'/'+xparts[2]+'/'+xparts[0];}var c=new YAHOO.widget.Calendar(id,container,cfg);c.selectEvent.subscribe(function(){var calDate = this.getSelectedDates()[0];calDate = calDate.getFullYear()+'-'+SO.twoDigits(calDate.getMonth() + 1) + '-' + SO.twoDigits(calDate.getDate()) + 'T00:00:00';input.value=calDate;},c,true);if(typeof cb!=='undefined'){cb(c);}c.render();return c;};
SO.namespace("tt");
SO.tt.enable=function(id){if(!document.getElementById||!document.getElementsByTagName)return;SO.tt.el=document.createElement("span");SO.tt.el.style.position="absolute";document.getElementsByTagName("body")[0].appendChild(SO.tt.el);var links;if(id==null){links=document.getElementsByTagName("a");}else{links=document.getElementById(id).getElementsByTagName("a");}for(var i=0;i<links.length;i++){SO.tt._1(links[i]);}};SO.tt._1=function(el){var tooltip,t,b,s,l;t=el.getAttribute("title");if(t==null||t.length==0)return;el.removeAttribute("title");tooltip=SO.tt._3("span","tt-balloon");s=SO.tt._3("span","top");s.appendChild(document.createTextNode(t));tooltip.appendChild(s);b=SO.tt._3("b","bottom");tooltip.appendChild(b);SO.tt._2(tooltip);el.tooltip=tooltip;el.onmouseover=SO.tt._5;el.onmouseout=SO.tt._6;el.onmousemove=SO.tt._4;};SO.tt._2=function(el){el.style.filter="alpha(opacity:95)";el.style.KHTMLOpacity="0.95";el.style.MozOpacity="0.95";el.style.opacity="0.95";};SO.tt._3=function(t,c){var x=document.createElement(t);x.className=c;x.style.display="block";return(x);};SO.tt._4=function(e){var posx=0,posy=0;if(e==null)e=window.event;if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY;}else if(e.clientX||e.clientY){if(document.documentElement.scrollTop){posx=e.clientX+document.documentElement.scrollLeft;posy=e.clientY+document.documentElement.scrollTop;}else{posx=e.clientX+document.body.scrollLeft;posy=e.clientY+document.body.scrollTop;}}SO.tt.el.style.top=(posy+10)+"px";SO.tt.el.style.left=(posx-20)+"px";};SO.tt._5=function(e){SO.tt.el.appendChild(this.tooltip);SO.tt._4(e);};SO.tt._6=function(e){if(SO.tt.el.childNodes.length>0){SO.tt.el.removeChild(SO.tt.el.firstChild);}};
//SOWEB.js
SO.namespace("soweb");
SO.soweb.init = function(media, locale,https)
{
    SO.media = media;
    SO.locale = locale;
    SO.https=https;
    var securepanel = SO.cookie.GetCookie('securepanel');
    if(null!==securepanel && ''!==securepanel)
    {
		var pa=securepanel.split('`');
		SO.cookie.SetCookie('securepanel','');
		SO.createpanel(pa[0],pa[1],pa[2],pa[3],pa[4],pa[5]);
    }
    if(SO.isElement('navigation-animated'))
    {
        var oMenu = new YAHOO.widget.Menu("navigation-animated",{position:"static",hidedelay:750,lazyload:true});
        oMenu.render();
    }
};
//END SOWEB.js