
if(typeof samo_main_js==="undefined"){var samo_main_js=true;(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}
if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])
return jQuery().find(selector);return jQuery(elem);}
selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"$Rev: 4620 $",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)
if(value===undefined)
return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
return this.each(function(i){for(name in options)
jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)
return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])
jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)
elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)
this[expando]=null;});if(events===true)
this.find("*").andSelf().each(function(i){if(this.nodeType==3)
return;var events=jQuery.data(this,"events");for(var type in events)
for(var handler in events[type])
jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)
return value;values.push(value);}}
return values;}else
return(this[0].value||"").replace(/\r/g,"");}
return undefined;}
if(value.constructor==Number)
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)
elems.reverse();}
var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))
obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))
scripts=scripts.add(elem);else{if(elem.nodeType==1)
scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
elem.parentNode.removeChild(elem);}
function now(){return+new Date;}
jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!="object"&&typeof target!="function")
target={};if(length==i){target=this;--i;}
for(;i<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)
script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
jQuery.cache[id]={};if(data!==undefined)
jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
break;if(!name)
jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
elem.removeAttribute(expando);}
delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length==undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options)
elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}
if(jQuery(elem).is(":visible"))
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)
return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}
if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}
if(name.match(/float/i))
name=styleFloat;if(!force&&style&&style[name])
ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))
ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)
stack.unshift(a);for(;i<stack.length;i++)
if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}
ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)
if(swap[i]!=null)
stack[i].style.display=swap[i];}
if(name=="opacity"&&ret=="")
ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(typeof elem=='number')
elem+='';if(!elem)
return;if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}
elem=jQuery.makeArray(div.childNodes);}
if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))
return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)
elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
throw"type property can't be changed";elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
return elem.getAttributeNode(name).nodeValue;return elem[name];}
if(msie&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)
ret[0]=array;else
while(i)
ret[--i]=array[i];}
return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])
if(elem.nodeType!=8)
first[pos++]=elem;}else
while(elem=second[i++])
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)
jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}
var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}
return cur;},find:function(t,context){if(typeof t!="string")
return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)
return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)
for(var c=ret[i].firstChild;c;c=c.nextSibling)
if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))
r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)
if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}
if(m=="+")break;}}
ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}
if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}
m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])
oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")
tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}
if(m[1]==".")
r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)
if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}
r=tmp;}
ret=r;}
t=t.replace(re2,"");}}
if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}
if(t)
ret=[];if(ret&&context==ret[0])
ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)
tmp.push(r[i]);}
return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}
if(!m)
break;if(m[1]==":"&&m[2]=="not")
r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")
r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))
z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)
tmp.push(a);}
r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)
if(n.nodeType==1)
n.nodeIndex=c++;merge[id]=true;}
var add=false;if(first==0){if(node.nodeIndex==last)
add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)
add=true;if(add^not)
tmp.push(node);}
r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")
fn=fn[m[2]];if(typeof fn=="string")
fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}
return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
matched.push(cur);cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(jQuery.browser.msie&&elem.setInterval)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)
return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)
elem.addEventListener(type,handle,false);else if(elem.attachEvent)
elem.attachEvent("on"+type,handle);}}
handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))
for(var type in events)
this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)
delete events[type][handler.guid];else
for(handler in events[type])
if(!parts[1]||events[type][handler].type==parts[1])
delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)
elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
ret=null;delete events[type];}}});}
for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}
if(!elem){if(this.global[type])
jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)
return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}
data[0].type=type;if(exclusive)
data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)
val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
val=false;if(event)
data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)
val=ret;}
if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;}
return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)
val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}
return val;},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" "),fix:function(event){if(event[expando]==true)
return event;var originalEvent=event;event={originalEvent:originalEvent};for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)
originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)
originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)
event.target=event.srcElement||document;if(event.target.nodeType==3)
event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();if(jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)
if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}
jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}
if(numStyles===undefined)
numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}
return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});(function($){jQuery._data_storage={};jQuery._data_keys=[];jQuery.stack_push=function(key,value){jQuery._data_storage[key]=value;jQuery._data_keys.push(key);if(jQuery._data_keys.length>10){delete jQuery._data_storage[jQuery._data_keys.shift()];}};jQuery.stack_get=function(key){if(jQuery.stack_exists(key)){return jQuery._data_storage[key];}else{return undefined;}};jQuery.stack_exists=function(key){return(typeof jQuery._data_storage[key]!='undefined');};})(jQuery);jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')
return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
callback=callback||function(){};var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params=='object'){params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type,clientcache){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type,clientcache:clientcache});},getScript:function(url,callback,clientcache){clientcache=(!jQuery.isFunction(callback))?Boolean(callback):((clientcache)?clientcache:false);callback=(!jQuery.isFunction(callback))?null:callback;return jQuery.get(url,null,callback,"script",clientcache);},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.dataType=='script'&&s.clientcache&&jQuery.stack_exists(s.url)){jQuery.globalEval(jQuery.stack_get(s.url));success();return;}
if(s.data&&s.processData&&typeof s.data!="string")
s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))
s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}
if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)
s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head)
head.removeChild(script);};}
s._url=s.url;if(s.dataType=="script"&&s.cache==null)
s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}
if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){if(!s.url.indexOf("http")||!s.url.indexOf("//")){s.url+=(s.url.match(/\?/)?"&":"?")+"is_js=1";}
var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)
script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=samo.xhr();if(s.username)
xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)
xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{if(s.dataType=='script'&&s.clientcache){jQuery.stack_push(s._url,xhr.responseText);}
data=jQuery.httpData(xhr,s.dataType,s);}catch(e){status="parsererror";}}
if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;if(!jsonp)
success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}
if(!s.async)
onreadystatechange();function success(){if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xhr,s]);}
function complete(){if(s.complete)
s.complete(xhr,status);if(s.global)
jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}
return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")
throw"parsererror";if(s&&s.dataFilter)
data=s.dataFilter(data,type);if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=eval("("+data+")");return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+'='+encodeURIComponent(value);};if(a.constructor==Array||a.jquery)
jQuery.each(a,function(){add(this.name,this.value);});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
jQuery.each(a[j],function(){add(j,this);});else
add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")
this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}
if(!type||(typeof type=="string"&&!fn))
return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)
queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)
fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)
if(timers[i].elem==this){if(gotoEnd)
timers[i](true);timers.splice(i,1);}});if(!gotoEnd)
this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)
q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}
return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)
q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)
jQuery(this).dequeue();if(jQuery.isFunction(opt.old))
opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)
options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)
this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style)
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))
return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")
this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")
this.elem.style.display="block";}
if(this.options.hide)
this.elem.style.display="none";if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);}
if(done)
this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.prop in fx.elem)
fx.elem[fx.prop]=fx.now;else if(fx.elem.style)
fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(!(mozilla&&elem==document.body)&&elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)
border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")
fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}
while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))
add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")
border(parent);parent=parent.parentNode;}
if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))
add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)
add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}
results={top:top,left:left};}
function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}
function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}
return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});;(function($){$.fn.listen=function(name,selector,handler){if(name=='click'){this.each(function(){$(this).bind(name,function(e){if($(e.target).is(selector)){handler.apply(e.target);}});});}
return this;};})(jQuery);(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;$.livequery.run(q.id);return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,bypassed:false,bypass:function(fn){var oldBypassed=jQuery.livequery.bypassed;jQuery.livequery.bypassed=true;var r=fn();jQuery.livequery.bypassed=oldBypassed;return r;},checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(jQuery.livequery.bypassed)return;if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove','html');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)
r.context=a.context,r.selector=a.selector;if(typeof a=='string')
r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);})();if(typeof samo==='undefined'){var samo={};}
samo.jQuery=jQuery.noConflict(true);(function($){$.fn.addOptions=function(){var add=function(el,v,t,sO){var option=document.createElement("option");t=t.replace(/&#39;/g,"'");option.value=v,option.text=t;var o=el.options;var oL=o.length;if(!el.cache){el.cache={};for(var i=0;i<oL;i++){el.cache[o[i].value]=i;}}
if(typeof el.cache[v]=="undefined"){el.cache[v]=oL;}
el.options[el.cache[v]]=option;if(sO){option.selected=true;}};if(arguments.length==0){return this;}
var items,v,t;if(typeof(arguments[0])=="object"){items=arguments[0];}
this.each(function(){if(this.nodeName.toLowerCase()!="select")return;$(this).find('option').remove().end().get(0).cache=null;for(var item in items){var sel=items[item].selected||false;add(this,item,items[item].title,sel);}});return this;};})(samo.jQuery);(function($){$.fn.numeric=function(decimal,callback)
{decimal=decimal||".";callback=typeof callback=="function"?callback:function(){};this.keypress(function(e)
{var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;if(key==13&&this.nodeName.toLowerCase()=="input")
{return true;}
else if(key==13)
{return false;}
var allow=false;if((e.ctrlKey&&key==97)||(e.ctrlKey&&key==65))return true;if((e.ctrlKey&&key==120)||(e.ctrlKey&&key==88))return true;if((e.ctrlKey&&key==99)||(e.ctrlKey&&key==67))return true;if((e.ctrlKey&&key==122)||(e.ctrlKey&&key==90))return true;if((e.ctrlKey&&key==118)||(e.ctrlKey&&key==86)||(e.shiftKey&&key==45))return true;if(key<48||key>57)
{if(key==45&&this.value.length==0)return true;if(key==decimal.charCodeAt(0)&&this.value.indexOf(decimal)!=-1)
{allow=false;}
if(key!=8&&key!=9&&key!=13&&key!=35&&key!=36&&key!=37&&key!=39&&key!=46)
{allow=false;}
else
{if(typeof e.charCode!="undefined")
{if(e.keyCode==e.which&&e.which!=0)
{allow=true;}
else if(e.keyCode!=0&&e.charCode==0&&e.which==0)
{allow=true;}}}
if(key==decimal.charCodeAt(0)&&this.value.indexOf(decimal)==-1)
{allow=true;}}
else
{allow=true;}
return allow;}).blur(function()
{var val=$(this).val();if(val!="")
{var re=new RegExp("^\\d+$|\\d*"+decimal+"\\d+");if(!re.exec(val))
{callback.apply(this);}}});return this;};})(samo.jQuery);(function($){$.fn.checklistbox=function(){return this.each(function(){var self=this;$.data(self,'num',$('input:checked',$(self)).length);var anys=$('.'+$(self).attr('name')+'_ANY');var any=(anys.length)?anys[0]:null;$.data(self,'any',any);$(self).listen('click','input',function(){var num=$.data(self,'num');num+=(this.checked)?1:-1;$.data(self,'num',num);$($.data(self,'any')).attr('checked',!$.data(self,'num'));$(self).triggerHandler('change');});$(any).bind('click',function(){if(this.checked){$(self).checklistbox_clear()}});});};$.fn.checklistbox_clear=function(){return this.each(function(){$($.data(this,'any')).attr('checked',true);$.data(this,'num',0);$(this).find('input:checked').attr('checked',false).end().find('label:hidden',$(this)).css('display','block').end().change();});};$.fn.checklistbox_value=function(){var result=[],self=this;$('input:checked',$(self)).each(function(){result.push(parseInt($(this).val()));});return result.join(',');};$.fn.add_hotels=function(items){var result=$('<div/>');$.each(items,function(idx,item){var input=$('<label><input type="checkbox" value="'+item.inc+'" >'+item.title+'</label>');items[idx].ref=input.get(0);items[idx].title=' '+item.title.toLowerCase().replace(/[^a-z0-9]/,' ');result.append(input);});return this.each(function(){$(this).empty().append(result.children());$.data(this,'items',items);});}})(samo.jQuery);(function($){$.fn.bgIframe=function(s){if(!($.browser.msie&&($.browser.version<7)))return this;s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe" frameborder="0" tabindex="-1" src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+
(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if(!$('iframe.bgiframe',this)[0])
this.insertBefore(document.createElement(html),this.firstChild);});};})(samo.jQuery);(function($){$.modal=function(content,settings){return $.modal.impl.init(content,settings);};$.modal.close=function(){$.modal.impl.close();};$.modal.remove=function(dialog){$.modal.impl.remove(dialog);};$.fn.modal=function(settings){return $.modal.impl.init(this,settings);};$.modal.defaults={overlay:50,overlayId:'modalOverlay',width:512,height:380,title:document.domain,containerId:'modalContainer',iframeId:'modalIframe',close:true,closeTitle:'Close',closeClass:'modalClose',onOpen:null,onShow:null,onClose:null};$.modal.impl={opts:null,dialog:{},init:function(content,settings){this.opts=$.extend({},$.modal.defaults,settings);if(this.dialog.overlay){return false;}
if(content.indexOf('basicModalContent')==-1){content='<div id="basicModalContent" class="samo_container">'+content+'</div>';}
this.dialog.content=content;this.create();this.open();if($.isFunction(this.opts.onShow)){this.opts.onShow.apply(this,[this.dialog]);}
return this;},create:function(){this.dialog.overlay=$('<div></div>').attr('id',this.opts.overlayId).css({opacity:this.opts.overlay/100}).hide().appendTo('body').bgIframe();if($.browser.msie&&($.browser.version<=8)){var height=Math.max(2000,$(document).height());this.dialog.overlay.css({position:'absolute',height:height+'px'});}
var title=(samo.LANG)?samo.LANG.CLOSE:this.opts.closeTitle;this.dialog.container=$('<div></div>').attr('id',this.opts.containerId).css('width',this.opts.width).css('height',this.opts.height).css('marginLeft',-(this.opts.width/2)).append(this.opts.close?'<div class="modalTitle"><a class="modalCloseImg '
+this.opts.closeClass
+'" title="'
+title+'"></a>'+this.opts.title+'</div>'+this.dialog.content:'<div class="modalTitle">'+this.opts.title+'</div>'+this.dialog.content).hide().appendTo('body');},bindEvents:function(){var modal=this;$('.'+this.opts.closeClass).click(function(e){e.preventDefault();modal.close();});},unbindEvents:function(){$('.'+this.opts.closeClass).unbind('click');},open:function(){if($.isFunction(this.opts.onOpen)){this.opts.onOpen.apply(this,[this.dialog]);}
else{this.dialog.overlay.show();this.dialog.container.show();}
this.bindEvents();},close:function(){if($.isFunction(this.opts.onClose)){this.opts.onClose.apply(this,[this.dialog]);}
else{this.dialog.container.remove();this.dialog.overlay.remove();}
this.dialog={};this.unbindEvents();},remove:function(dialog){dialog.container.remove();dialog.overlay.remove();}};})(samo.jQuery);(function($){$.fn.SpinButton=function(cfg){return this.each(function(){this.spinCfg={min:cfg&&!isNaN(parseFloat(cfg.min))?Number(cfg.min):(($(this).attr('min'))?Number($(this).attr('min')):null),max:cfg&&!isNaN(parseFloat(cfg.max))?Number(cfg.max):(($(this).attr('max'))?Number($(this).attr('max')):null),step:cfg&&cfg.step?Number(cfg.step):1,page:cfg&&cfg.page?Number(cfg.page):10,upClass:cfg&&cfg.upClass?cfg.upClass:'up',downClass:cfg&&cfg.downClass?cfg.downClass:'down',reset:cfg&&cfg.reset?cfg.reset:this.value,delay:cfg&&cfg.delay?Number(cfg.delay):500,interval:cfg&&cfg.interval?Number(cfg.interval):100,_btn_width:16,_btn_height:14,_direction:null,_delay:null,_repeat:null};this.adjustValue=function(i){var v=(isNaN(this.value)?this.spinCfg.reset:Number(this.value))+Number(i);if(this.spinCfg.min!==null)v=Math.max(v,this.spinCfg.min);if(this.spinCfg.max!==null)v=Math.min(v,this.spinCfg.max);this.value=v;};$(this).addClass(cfg&&cfg.spinClass?cfg.spinClass:'spin-button').mousemove(function(e){var x=e.pageX||e.x;var y=e.pageY||e.y;var el=e.target||e.srcElement;var direction=(x>coord(el,'offsetLeft')+el.offsetWidth-this.spinCfg._btn_width)?((y<coord(el,'offsetTop')+this.spinCfg._btn_height)?1:-1):0;if(direction!==this.spinCfg._direction){switch(direction){case 1:$(this).removeClass(this.spinCfg.downClass).addClass(this.spinCfg.upClass);break;case-1:$(this).removeClass(this.spinCfg.upClass).addClass(this.spinCfg.downClass);break;default:$(this).removeClass(this.spinCfg.upClass).removeClass(this.spinCfg.downClass);}
this.spinCfg._direction=direction;}}).mouseout(function(){$(this).removeClass(this.spinCfg.upClass).removeClass(this.spinCfg.downClass);this.spinCfg._direction=null;}).mousedown(function(e){if(this.spinCfg._direction!=0){var self=this;var adjust=function(){self.adjustValue(self.spinCfg._direction*self.spinCfg.step);};adjust();self.spinCfg._delay=window.setTimeout(function(){adjust();self.spinCfg._repeat=window.setInterval(adjust,self.spinCfg.interval);},self.spinCfg.delay);}}).mouseup(function(e){window.clearInterval(this.spinCfg._repeat);window.clearTimeout(this.spinCfg._delay);}).dblclick(function(e){if($.browser.msie)
this.adjustValue(this.spinCfg._direction*this.spinCfg.step);}).keydown(function(e){switch(e.keyCode){case 38:this.adjustValue(this.spinCfg.step);break;case 40:this.adjustValue(-this.spinCfg.step);break;case 33:this.adjustValue(this.spinCfg.page);break;case 34:this.adjustValue(-this.spinCfg.page);break;}}).bind("mousewheel",function(e){if(e.wheelDelta>=120)
this.adjustValue(this.spinCfg.step);else if(e.wheelDelta<=-120)
this.adjustValue(-this.spinCfg.step);e.preventDefault();}).change(function(e){this.adjustValue(0);});if(this.addEventListener){this.addEventListener('DOMMouseScroll',function(e){if(e.detail>0)
this.adjustValue(-this.spinCfg.step);else if(e.detail<0)
this.adjustValue(this.spinCfg.step);e.preventDefault();},false);}});function coord(el,prop){var c=el[prop],b=document.body;while((el=el.offsetParent)&&(el!=b)){if(!$.browser.msie||(el.currentStyle.position!='relative'))
c+=el[prop];}
return c;}};})(samo.jQuery);(function($){function getCaretPosition(ctl){var res={begin:0,end:0};if(ctl.setSelectionRange){res.begin=ctl.selectionStart;res.end=ctl.selectionEnd;}else if(document.selection&&document.selection.createRange){var range=document.selection.createRange();res.begin=0-range.duplicate().moveStart('character',-100000);res.end=res.begin+range.text.length;}
return res;};function setCaretPosition(ctl,pos){if(ctl.setSelectionRange){ctl.focus();ctl.setSelectionRange(pos,pos);}else if(ctl.createTextRange){var range=ctl.createTextRange();range.collapse(true);range.moveEnd('character',pos);range.moveStart('character',pos);range.select();}};var charMap={'3':"[0|1|2|3]",'1':"[0|1]",'2':"[1|2]",'0':"[0|9]",'9':"[0-9]",'a':"[A-Za-z]",'*':"[A-Za-z0-9]"};$.mask={addPlaceholder:function(c,r){charMap[c]=r;}};$.fn.mask=function(mask,settings){settings=$.extend({placeholder:"_",completed:null},settings);var reString="^";for(var i=0;i<mask.length;i++)
reString+=(charMap[mask.charAt(i)]||("\\"+mask.charAt(i)));reString+="$";var re=new RegExp(reString);return this.each(function(){var input=$(this);var buffer=new Array(mask.length);var locked=new Array(mask.length);for(var i=0;i<mask.length;i++){locked[i]=charMap[mask.charAt(i)]==null;buffer[i]=locked[i]?mask.charAt(i):settings.placeholder;}
input.focus(function(){checkVal();writeBuffer();setCaretPosition(this,0);});input.blur(checkVal);if($.browser.msie)
this.onpaste=function(){setTimeout(checkVal,0);};else if($.browser.mozilla)
this.addEventListener('input',checkVal,false);var ignore=false;input.keydown(function(e){var pos=getCaretPosition(this);var k=e.keyCode;ignore=(k<16||(k>16&&k<32)||(k>32&&k<41));if((pos.begin-pos.end)!=0&&(!ignore||k==8||k==46)){clearBuffer(pos.begin,pos.end);}
if(k==8){while(pos.begin-->=0){if(!locked[pos.begin]){buffer[pos.begin]=settings.placeholder;if($.browser.opera){writeBuffer(pos.begin);setCaretPosition(this,pos.begin+1);}else{writeBuffer();setCaretPosition(this,pos.begin);}
return false;}}}else if(k==46){clearBuffer(pos.begin,pos.begin+1);writeBuffer();setCaretPosition(this,pos.begin);return false;}else if(k==27){clearBuffer(0,mask.length);writeBuffer();setCaretPosition(this,0);return false;}});input.keypress(function(e){if(ignore){ignore=false;return;}
e=e||window.event;var k=e.charCode||e.keyCode||e.which;var pos=getCaretPosition(this);var caretPos=pos.begin;if(e.ctrlKey||e.altKey){return true;}else if((k>=41&&k<=122)||k==32||k>186){while(pos.begin<mask.length){var reString=charMap[mask.charAt(pos.begin)];var match;if(reString){var reChar=new RegExp(reString);match=String.fromCharCode(k).match(reChar);}else{pos.begin+=1;pos.end=pos.begin;caretPos+=1;continue;}
if(match)
buffer[pos.begin]=String.fromCharCode(k);else
return false;while(++caretPos<mask.length){if(!locked[caretPos])
break;}
break;}}else
return false;writeBuffer();if(settings.completed&&caretPos>=buffer.length)
settings.completed.call(input);else
setCaretPosition(this,caretPos);return false;});function clearBuffer(start,end){for(var i=start;i<end;i++){if(!locked[i])
buffer[i]=settings.placeholder;}};function writeBuffer(pos){var s="";for(var i=0;i<mask.length;i++){s+=buffer[i];if(i==pos)
s+=settings.placeholder;}
input.val(s);return s;};function checkVal(){var test=input.val();var pos=0;for(var i=0;i<mask.length;i++){if(!locked[i]){while(pos++<test.length){var reChar=new RegExp(charMap[mask.charAt(i)]);if(test.charAt(pos-1).match(reChar)){buffer[i]=test.charAt(pos-1);break;}}}}
var s=writeBuffer();if(!s.match(re)){input.val("");clearBuffer(0,mask.length);}};});};})(samo.jQuery);Date.dayNames=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];Date.abbrDayNames=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];Date.monthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];Date.abbrMonthNames=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];Date.firstDayOfWeek=1;if(!Date.format){Date.format='dd.mm.yyyy';}
(function(){function add(name,method){if(!Date.prototype[name]){Date.prototype[name]=method;}}
add("isLeapYear",function(){var y=this.getFullYear();return(y%4===0&&y%100!==0)||y%400===0;});add("isWeekend",function(){return 0===this.getDay()||6===this.getDay();});add("isWeekDay",function(){return!this.isWeekend();});add("getDaysInMonth",function(){return[31,(this.isLeapYear()?29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()];});add("getDayName",function(abbreviated){return abbreviated?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()];});add("getMonthName",function(abbreviated){return abbreviated?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()];});add("getDayOfYear",function(){var tmpdtm=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-tmpdtm.getTime())/86400000);});add("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7);});add("setDayOfYear",function(day){this.setMonth(0);this.setDate(day);return this;});add("addYears",function(num){this.setFullYear(this.getFullYear()+num);return this;});add("addMonths",function(num){var tmpdtm=this.getDate();this.setMonth(this.getMonth()+num);if(tmpdtm>this.getDate())
this.addDays(-this.getDate());return this;});add("addDays",function(num){this.setDate(this.getDate()+num);return this;});add("addHours",function(num){this.setHours(this.getHours()+num);return this;});add("addMinutes",function(num){this.setMinutes(this.getMinutes()+num);return this;});add("addSeconds",function(num){this.setSeconds(this.getSeconds()+num);return this;});add("zeroTime",function(){this.setMilliseconds(0);this.setSeconds(0);this.setMinutes(0);this.setHours(0);return this;});add("asString",function(r){if(!r)r=Date.format;return r.split('yyyy').join(this.getFullYear()).split('yy').join(this.getYear()).split('mmm').join(this.getMonthName(true)).split('mm').join(_zeroPad(this.getMonth()+1)).split('dd').join(_zeroPad(this.getDate()));});Date.fromString=function(s,f)
{if(!f)f=Date.format;var d=new Date('01/01/1977');var iY=f.indexOf('yyyy');if(iY>-1){d.setFullYear(Number(s.substr(iY,4)));}else{d.setYear(Number(s.substr(f.indexOf('yy'),2)));}
var iM=f.indexOf('mmm');if(iM>-1){var mStr=s.substr(iM,3);for(var i=0;i<Date.abbrMonthNames.length;i++){if(Date.abbrMonthNames[i]==mStr)break;}
d.setMonth(i);}else{d.setMonth(Number(s.substr(f.indexOf('mm'),2))-1);}
d.setDate(Number(s.substr(f.indexOf('dd'),2)));if(isNaN(d.getTime()))return false;return d;};var _zeroPad=function(num){var s='0'+num;return s.substring(s.length-2);};Date.dateBetween=function(s){if(!s)return false;var dateMin,dateMax;if(arguments.length==1){dateMin=new Date();dateMax=new Date();dateMax.setFullYear(dateMax.getFullYear()+1);}else{if(arguments.length==2){dateMin=new Date();dateMax=Date.fromString(arguments[1])||new Date();}else{dateMin=Date.fromString(arguments[1]);dateMax=Date.fromString(arguments[2]);}}
s=Date.fromString(s);if(Date.isDate(s)&&(s-dateMin.getTime())>=0&&(dateMax.getTime()-s)>=0){return true;}
return false;};add("getAge",function(){var now=(arguments[0])?arguments[0]:(new Date()).zeroTime();return Math.floor((now.getTime()-this.getTime())/(1000*3600*24*365.25)+0.001);});})();(function($){$.fn.extend({renderCalendar:function(s)
{s=$.extend({month:null,year:null,showHeader:$.dpConst.SHOW_HEADER_SHORT,dpController:null,hoverClass:'dp-hover'},s);if(s.showHeader!=$.dpConst.SHOW_HEADER_NONE){var headRow='<tr>';for(var i=Date.firstDayOfWeek;i<Date.firstDayOfWeek+7;i++){var weekday=i%7;var day=Date.dayNames[weekday];headRow+='<th title="'+day+'" class="'+(weekday==0||weekday==6?'weekend':'weekday')+'">'+day.substr(0,1)+'</th>';}
headRow+='</tr>';};var $calendarTable='<table class="jCalendar"><thead>'+headRow+'</thead><tbody>';var today=(new Date()).zeroTime();var month=s.month==undefined?today.getMonth():s.month;var year=s.year||today.getFullYear();var currentDate=(new Date(year,month,1)).zeroTime();var firstDayOffset=Date.firstDayOfWeek-currentDate.getDay()+1;if(firstDayOffset>1)firstDayOffset-=7;currentDate.addDays(firstDayOffset-1);var w=0;while(w++<6){$calendarTable+='<tr>';for(var i=0;i<7;i++){var thisMonth=currentDate.getMonth()==month;var className=(thisMonth?'current-month ':'other-month ')+
(currentDate.isWeekend()?'weekend ':'weekday ')+
(thisMonth&&currentDate.getTime()==today.getTime()?'today ':'');className+=(s.dpController.isValidDate(currentDate)&&currentDate.getTime()>=s.dpController.startDate.getTime())?'active ':'notactive ';$calendarTable+='<td class="'+className+'" samo:dt="'+currentDate.getTime()+'" >'+currentDate.getDate()+'</td>';currentDate.addDays(1);}
$calendarTable+='</tr>';}
$calendarTable+='</tbody></table>';$('#dp-calendar').listen('click','td.active',function(){var $this=$(this),c=s.dpController,_d=$(this).attr('samo:dt');var d=new Date();d.setTime(_d);c.setSelected(d,!$this.is('.selected')||!c.selectMultiple);var _s=c.isSelected(_d);$(c.ele).trigger('dateSelected',[d,$this,_s]);if(c.closeOnSelect){c._closeCalendar();}});return this.each(function()
{$(this).empty().append($calendarTable);});},datePicker:function(s)
{if(!$.event._dpCache)$.event._dpCache=[];s=$.extend({month:undefined,year:undefined,startDate:undefined,endDate:undefined,validDates:undefined,createButton:false,showYearNavigation:false,closeOnSelect:true,displayClose:false,selectMultiple:false,clickInput:false,innerButton:true,verticalPosition:$.dpConst.POS_TOP,horizontalPosition:$.dpConst.POS_LEFT,verticalOffset:0,horizontalOffset:-75,hoverClass:'dp-hover'},s);return this.each(function()
{var $this=$(this);if(!this._dpId){this._dpId=$.event.guid++;$.event._dpCache[this._dpId]=new DatePicker(this);}
var controller=$.event._dpCache[this._dpId];var _s=$.extend(s,{startDate:$this.attr('samo:startDate'),validDates:$this.attr('samo:validDates'),endDate:$this.attr('samo:endDate')});controller.init(_s);if(s.innerButton){$(this).mousemove(function(e){var x=e.pageX||e.x;var y=e.pageY||e.y;var el=e.target||e.srcElement;var direction=(x>coord(el,'offsetLeft')+el.offsetWidth-16)?((y<coord(el,'offsetTop')+14)?1:-1):0;if(direction!==this._direction){switch(direction){case 1:$this.addClass('date-active-btn');break;default:$this.removeClass('date-active-btn');}
this._direction=direction;}}).mouseout(function(){$this.removeClass('date-active-btn');this._direction=null;}).click(function(e){if(this._direction!=0){$this.dpDisplay();}});}
if($this.is(':text')){$this.bind('dateSelected',function(e,selectedDate,$td)
{this.value=selectedDate.asString();}).bind('change',function()
{var d=Date.fromString(this.value);if(d){controller.setSelected(d,true,true);}});if(s.clickInput){$this.bind('click',function()
{$this.dpDisplay();});}}
$this.addClass('dp-applied');if($this.val().length){$this.dpSetSelected($(this).val());}})},dpSetDisabled:function(s)
{return _w.call(this,'setDisabled',s);},dpSetValidDates:function(d)
{return _w.call(this,'setValidDates',d);},dpSetStartDate:function(d)
{return _w.call(this,'setStartDate',d);},dpSetEndDate:function(d)
{return _w.call(this,'setEndDate',d);},dpGetSelected:function()
{var c=_getController(this[0]);if(c){return c.getSelected();}
return null;},dpSetSelected:function(d,v,m)
{if(v==undefined)v=true;if(m==undefined)m=true;return _w.call(this,'setSelected',Date.fromString(d),v,m);},dpDisplay:function(e)
{return _w.call(this,'display',e);},_dpDestroy:function()
{}});var _w=function(f,a1,a2,a3)
{return this.each(function()
{var c=_getController(this);if(c){c[f](a1,a2,a3);}});};function DatePicker(ele)
{this.ele=ele;this.displayedMonth=null;this.displayedYear=null;this.startDate=null;this.endDate=null;this.showYearNavigation=null;this.closeOnSelect=null;this.displayClose=null;this.selectMultiple=null;this.verticalPosition=null;this.horizontalPosition=null;this.verticalOffset=null;this.horizontalOffset=null;this.button=null;this.selectedDates={};this.validDates='';this.startValidDate=null;};$.extend(DatePicker.prototype,{init:function(s)
{this.setStartDate(s.startDate);this.setValidDates(s.validDates);this.setEndDate(s.endDate);this.setDisplayedMonth(Number(s.month),Number(s.year));this.showYearNavigation=s.showYearNavigation;this.closeOnSelect=s.closeOnSelect;this.displayClose=s.displayClose;this.selectMultiple=s.selectMultiple;this.verticalPosition=s.verticalPosition;this.horizontalPosition=s.horizontalPosition;this.hoverClass=s.hoverClass;this.setOffset(s.verticalOffset,s.horizontalOffset);},setStartDate:function(d)
{if(d){this.startDate=Date.fromString(d).zeroTime();}
if(!this.startDate){this.startDate=(new Date()).zeroTime();}
this.setDisplayedMonth(this.displayedMonth,this.displayedYear);},setEndDate:function(d)
{if(d){this.endDate=Date.fromString(d).zeroTime();}
if(!this.endDate){this.endDate=(new Date('12/31/2089')).zeroTime();}
if(this.endDate.getTime()<this.startDate.getTime()){this.endDate.setTime(this.startDate.getTime());}
this.setDisplayedMonth(this.displayedMonth,this.displayedYear);},setValidDates:function(d){if(d){this.validDates=d;this.startValidDate=new Date();this.startValidDate.setTime(this.startDate.getTime());this.endDate=new Date();this.endDate.setTime(this.startDate.getTime());this.endDate.addDays(d.length);}},setPosition:function(v,h)
{this.verticalPosition=v;this.horizontalPosition=h;},setOffset:function(v,h)
{this.verticalOffset=parseInt(v)||0;this.horizontalOffset=parseInt(h)||0;},setDisplayedMonth:function(m,y)
{if(this.startDate==undefined||this.endDate==undefined){return;}
var s=new Date(this.startDate.getTime());s.setDate(1);var e=new Date(this.endDate.getTime());e.setDate(1);var t;if(isNaN(m)&&isNaN(y)){t=new Date().zeroTime();t.setDate(1);}else if(isNaN(m)){t=new Date(y,this.displayedMonth,1);}else if(isNaN(y)){t=new Date(this.displayedYear,m,1);}else{t=new Date(y,m,1)}
if(t.getTime()<s.getTime()){t=s;}else if(t.getTime()>e.getTime()){t=e;}
this.displayedMonth=t.getMonth();this.displayedYear=t.getFullYear();},setSelected:function(d,v,moveToMonth)
{if(this.selectMultiple==false){this.selectedDates={};}
if(moveToMonth){this.setDisplayedMonth(d.getMonth(),d.getFullYear());}
this.selectedDates[d.getTime()]=v;},isSelected:function(t)
{return this.selectedDates[t];},getSelected:function()
{var r=[];for(t in this.selectedDates){if(this.selectedDates[t]==true){r.push(new Date(Number(t)));}}
return r;},display:function(eleAlignTo)
{if($(this.ele).is('.dp-disabled'))return;eleAlignTo=eleAlignTo||this.ele;var c=this;var $ele=$(eleAlignTo);var eleOffset=$ele.offset();var _checkMouse=function(e)
{var el=e.target;var cal=$('#dp-popup')[0];while(true){if(el==cal){return true;}else if(el==document){c._closeCalendar();return false;}else{el=$(el).parent()[0];}}};this._checkMouse=_checkMouse;this._closeCalendar(true);$('body').append($('<div></div>').attr('id','dp-popup').css({'top':eleOffset.top+c.verticalOffset,'left':eleOffset.left+c.horizontalOffset}).append($('<h2></h2>'),$('<div id="dp-nav-prev"></div>').append($('<a id="dp-nav-prev-month" href="#" title="'+$.dpText.TEXT_PREV_MONTH+'">&#x2190;</a>').bind('click',function()
{return c._displayNewMonth.call(c,this,-1,0);})),$('<div id="dp-nav-next"></div>').append($('<a id="dp-nav-next-month" href="#" title="'+$.dpText.TEXT_NEXT_MONTH+'">&#x2192;</a>').bind('click',function()
{return c._displayNewMonth.call(c,this,1,0);})),$('<div></div>').attr('id','dp-calendar')).bgIframe());c._renderCalendar();$(document).bind('mousedown',this._checkMouse);},isValidDate:function(thisDate){if(this.endDate&&thisDate.getTime()>this.endDate.getTime())return false;if(!this.validDates)return true;var dateDiff=Math.round((thisDate.getTime()-this.startValidDate.getTime())/86400000);return(dateDiff>=0&&parseInt(this.validDates.substr(dateDiff,1))==1)?true:false;},_displayNewMonth:function(ele,m,y)
{if(!$(ele).is('.disabled')){this.setDisplayedMonth(this.displayedMonth+m,this.displayedYear+y);this._clearCalendar();this._renderCalendar();$(this.ele).trigger('dpMonthChanged',[this.displayedMonth,this.displayedYear]);}
ele.blur();return false;},_renderCalendar:function()
{$('#dp-popup h2').html(Date.monthNames[this.displayedMonth]+' '+this.displayedYear);$('#dp-calendar').renderCalendar({month:this.displayedMonth,year:this.displayedYear,dpController:this,hoverClass:this.hoverClass});if(this.displayedYear==this.startDate.getFullYear()&&this.displayedMonth==this.startDate.getMonth()){$('#dp-nav-prev-year').addClass('disabled');$('#dp-nav-prev-month').addClass('disabled');$('#dp-calendar td.other-month').each(function()
{var $this=$(this);if(Number($this.text())>20){$this.addClass('disabled');}});var d=this.startDate.getDate();$('#dp-calendar td.current-month').each(function()
{var $this=$(this);if(Number($this.text())<d){$this.addClass('disabled');}});}else{$('#dp-nav-prev-year').removeClass('disabled');$('#dp-nav-prev-month').removeClass('disabled');var d=this.startDate.getDate();if(d>20){var sd=new Date(this.startDate.getTime());sd.addMonths(1);if(this.displayedYear==sd.getFullYear()&&this.displayedMonth==sd.getMonth()){$('#dp-calendar td.other-month').each(function()
{var $this=$(this);if(Number($this.text())<d){$this.addClass('disabled');}});}}}
if(this.displayedYear==this.endDate.getFullYear()&&this.displayedMonth==this.endDate.getMonth()){$('#dp-nav-next-year').addClass('disabled');$('#dp-nav-next-month').addClass('disabled');$('#dp-calendar td.other-month').each(function()
{var $this=$(this);if(Number($this.text())<14){$this.addClass('disabled');}});var d=this.endDate.getDate();$('#dp-calendar td.current-month').each(function()
{var $this=$(this);if(Number($this.text())>d){$this.addClass('disabled');}});}else{$('#dp-nav-next-year').removeClass('disabled');$('#dp-nav-next-month').removeClass('disabled');var d=this.endDate.getDate();if(d<13){var ed=new Date(this.endDate.getTime());ed.addMonths(-1);if(this.displayedYear==ed.getFullYear()&&this.displayedMonth==ed.getMonth()){$('#dp-calendar td.other-month').each(function()
{var $this=$(this);if(Number($this.text())>d){$this.addClass('disabled');}});}}}},_closeCalendar:function(programatic)
{$(document).unbind('mousedown',this._checkMouse);this._clearCalendar();$('#dp-popup a').unbind();$('#dp-popup').empty().remove();if(!programatic){$(this.ele).trigger('dpClosed',[this.getSelected()]);}},_clearCalendar:function()
{$('#dp-calendar').empty();}});$.dpConst={SHOW_HEADER_NONE:0,SHOW_HEADER_SHORT:1,SHOW_HEADER_LONG:2,POS_TOP:0,POS_BOTTOM:1,POS_LEFT:0,POS_RIGHT:1};$.dpText={TEXT_PREV_YEAR:'Previous year',TEXT_PREV_MONTH:'Previous month',TEXT_NEXT_YEAR:'Next year',TEXT_NEXT_MONTH:'Next month',TEXT_CLOSE:'Close',TEXT_CHOOSE_DATE:'Choose date'};$.dpVersion='$Id: pack.main.js 4620 2010-08-09 05:39:09Z MiRacLe $';function _getController(ele)
{if(ele._dpId)return $.event._dpCache[ele._dpId];return false;};if($.fn.bgIframe==undefined){$.fn.bgIframe=function(){return this;};};$(window).bind('unload',function(){var els=$.event._dpCache||[];for(var i in els){$(els[i].ele)._dpDestroy();}});function coord(el,prop){var c=el[prop],b=document.body;while((el=el.offsetParent)&&(el!=b)){if(!$.browser.msie||(el.currentStyle.position!='relative'))
c+=el[prop];}
return c;}})(samo.jQuery);(function($){samo.price_helpers=function($module_container){$('.CURRENCY',$module_container).bind('change',function(){var $currency_to=$(this).val();$('.resultset table .price',$module_container).each(function(){var $new_price='???';var $currency_from=$(this).attr('samo:origCurrency');var $orig_price=$(this).attr('samo:origPrice');if(parseFloat($orig_price)){try{if($currency_from==$currency_to){$new_price=$orig_price;}else{var $cross_rate=samo.CROSS_RATES[$currency_from][$currency_to];$new_price=Math.ceil(parseFloat($orig_price)*$cross_rate);if(isNaN($new_price)){$new_price='???';}}
var curr='';$.each(samo.CROSS_RATES,function(result){if(this.Inc==$currency_to){curr=this.Name;}});$new_price+=' '+curr;}catch(e){}
$(this).html($new_price);}});});};samo.price_clickable=function($module_container){$('.resultset',$module_container).listen('click','td.price',function(){if($(this).is('.stop')){alert($(this).attr('title'));}else{if($(this).is('.bron')){var claim=$(this).attr('samo:claimInc'),$tr=$(this).parents('tr:first');var params={CLAIM:claim,TOWNFROMINC:$tr.attr('samo:TOWNFROMINC'),STATEINC:$tr.attr('samo:STATEINC')};var bronurl=samo.ROUTES.bron.url+$.param(params);window.open(bronurl,'claim_'+Math.abs(claim));}}});};})(samo.jQuery);(function($){samo.spo_helpers=function(_ROOT_URL,$module_container){var _controls=$('select,input',$module_container);samo.cache_controls($module_container);$('.CHECKIN_ANY',$module_container).bind('click',function(){var flag=$(this).attr('checked')||false;if(flag){$('.CHECKIN',$module_container).val('');}}).attr('checked',true);if(parseInt($.getParameter('DOLOAD',true))==1){loadSpo();}
$('select,input',$module_container).bind('change',function(){$('.resultset',$module_container).empty();});$('.TOWNFROMINC,.STATEINC',$module_container).bind('change',function(){$('.TOURINC,.HOTELINC',$module_container).find('option').remove();});$('.TOWNFROMINC,.STATEINC,.TOURINC',$module_container).bind('change',function(){if((this.name=='STATEINC'&&this.value==0))return;$.getScript(getParams($(this).attr('name')));});$('.load',$module_container).bind('click',loadSpo);function loadSpo(){if(samo.checkStateAndTownfrom($module_container)){$.getScript(getParams('SPOS'),initResultset,true);}}
function getParams(action){var useGET=arguments[1]||false;var result={};result.samo_action=action;_controls.each(function(){var name=this.name||$(this).attr('name');var value=$.controlValue(this,useGET);if(name&&value&&value!==0)
result[name]=value;});if(result.CHECKIN_ANY){delete result.CHECKIN;delete result.CHECKIN_ANY;}
return _ROOT_URL+$.param(result);}
function initResultset(){$('table.res',$module_container).listen('click','.toggle_hotels',function(){var self=this,$hotels=$('.hotels',$(self).parent());if(!$(self).attr('load')){$.getScript(getParams('SPOHOTELS')+'&SPOINC='+$(self).parent().attr('id').replace('spo_',''),function(){$(self).text($(self).attr('samo:hide_title'))});}else{if($hotels.is(':visible')){$hotels.slideUp(function(){$(self).text($(self).attr('samo:show_title'))});}else{$hotels.slideDown(function(){$(self).text($(self).attr('samo:hide_title'));});}}});$('table.res',$module_container).listen('click','div.sponum',function(){var params={NIGHTS_FROM:5,NIGHTS_TILL:14};params.STATEINC=$.controlValue($('.STATEINC',$module_container).get(0));params.TOWNFROMINC=$.controlValue($('.TOWNFROMINC',$module_container).get(0));params.DOLOAD=1;params.SPOINC=$(this).parent().attr('samo:SPOINC');params.CHECKIN_BEG=$(this).parent().attr('samo:DBEG');params.CHECKIN_END=$(this).parent().attr('samo:DEND');window.location.href=samo.ROUTES.search_tour.url+$.param(params);});}
initResultset();}})(samo.jQuery);(function($){samo.tourist_helpers=function($module_container){$('input.date',$module_container).mask(Date.mask).attr('title',samo.LANG.DATE_FORMAT_TITLE);$('input.rus',$module_container).bind('blur',function(){var val=$.trim($(this).val());if(val.length){var translit_to=$('input.'+$(this).attr('translit_to'),$(this).parent().parent());$(this).val(val.toUpperCase());if(!translit_to.val().length){translit_to.val(val.translit());}}});$('input.translit',$module_container).bind('blur',function(){var val=$.trim($(this).val());if(val.length){$(this).val(val.translit().toUpperCase());}});$('.firstlname,.lastlname',$module_container).bind('blur',function(){$(this).val($.trim($(this).val()).translit());});$('select.status',$module_container).bind('change',function(){if(this.value=='MR'||this.value=='MRS'){var male=(this.value=='MRS')?0:1;$(this).parent().parent().find('input[id^=SEX][@value='+male+']').attr('checked',true);}});$('input[id^=SEX]',$module_container).bind('click',function(){var currHuman=$(this).parent().parent().parent().parent().find('select.status').val();if((currHuman=='MR'||currHuman=='MRS')){if(this.value==1){$(this).parent().parent().parent().parent().find('select.status option[@value=MR]').attr('selected',true);}else{$(this).parent().parent().parent().parent().find('select.status option[@value=MRS]').attr('selected',true);}}});}
samo.checkAge=function(human,age){switch(human){case'INF':return(age>=0&&age<2);break;case'CHD':return(age>=2&&age<18);break;default:return(age>=2&&age<=99);break;}
return false;}})(samo.jQuery);(function($){Date.dayNames=['Воскресенье','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота'];Date.abbrDayNames=['Вс','Пн','Вт','Ср','Чт','Пт','Сб'];Date.monthNames=['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'];Date.abbrMonthNames=['Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'];samo.LANG={};$.extend(samo.LANG,{CLOSE:'Закрыть',TIMEOUT_ERROR:'Превышен интервал ожидания ответа сервера.',LOADING:'Загрузка данных',NODATA:'Нет данных',NOT_SET_STATEINC:'Не выбрана страна назначения',NOT_SET_TOWNFROMINC:'Не выбран город вылета',NOT_SET_TOWNTO:'Не выбран город назначения',NOT_SET_TOURINC:'Не выбран тур',DATE_FORMAT_TITLE:'ДД.ММ.ГГГГ',UNLOAD_WARNING:"Текст,который вы ввели,не отправлен и потеряется.\r\n Вы действительно хотите перейти на другую страницу?",NOT_SET_FIRM_TOWN:'Не указано местоположение вашего агентства',NOT_SET_AGENCY_INFO:'Не хватает данных для поиска агентства',NOT_SET_AGENCY_LOGIN:'Не введен предпочитаемый логин',MORE_AGENCY_LOGIN:'Превышено максимальное количество аккаунтов для одного агентства',LAST_SPO_ALL_SPO:'Все СПО',LAST_SPO_SHOW_PRICE:'Просмотр цен',FRPLACE_AVAIL:'есть',FRPLACE_REQUEST:'по запросу',PASSPORT_EXPIRED:'Срок действия паспорта недостаточен для выбранного вами тура',REQUIRED_FIELD_EMPTY:'Не заполнено обязательное поле',INVALID_HUMAN_STATUS:'Статус туриста не соответствует его возрасту',INCORRECT_DATE:'Проверьте корректность даты',NO_FREIGHTS:'Нет транспорта',NO_HOTEL:'Не указана гостиница',NO_ROOM:'Не указана комната',NO_HTPLACE:'Не указано размещение',NO_MEAL:'Не указано питание',TOUR_SEARCH_RES_YES_PLACE:'есть места',TOUR_SEARCH_RES_NO_PLACE:'нет мест',TOUR_SEARCH_RES_REQUEST_PLACE:'места по запросу',CL_R_O_PRINT_VOUCHER:'ваучер',CL_R_O_PRINT_POLICY:'полис',CL_R_E_DOC:'печать электронных документов',CL_R_RES_A_COST:'стоимость',CL_R_RES_A_CANCEL_CLAIM:'запрос на отмену',CL_R_RES_A_INVOICE:'счет для б/н оплаты',CL_R_RES_A_INVOICE_DOCUM:'бухгалтерские документы',CL_R_RES_A_CONFIRM:'подтверждение',CL_R_RES_A_AVIACOST:'стоимость авиабилетов',CL_R_RES_A_PAY_VIA_IMPEX:'Оплатить в ImpexBank',CL_R_COST_AMOUNT:'Всего',CL_R_O_STATUS_CONFIRMED:'подтверждено',CL_R_O_STATUS_IN_PROCESS:'бронирование',CL_R_O_STATUS_CANCEL:'отменено',CL_R_O_STATUS_WAITING:'лист ожидания',CL_R_Q_PRINT_VOUCHER:'Вы действительно хотите распечатать ваучер?',CL_R_Q_PRINT_POLICY:'Вы действительно хотите распечатать страховой полис?',CL_R_Q_CANCEL_CLAIM:'Вы действительно хотите отправить запрос на аннуляцию заявки?',CL_R_Q_PRINT_INVOICE:'Вы действительно хотите выписать счет для безналичной оплаты?',CL_R_P_EDIT:'редактировать',CL_R_P_ANKETA:'анкета',CL_R_PRINT_ATICKET:'печать',CL_R_PRINT_VSTATUS:'проверить',CL_R_BOOKLET:'памятка туристам',REQUIRED_SERVICE_TYPE:'обязательный тип услуги',CL_R_RES_A_PSBANK:'ПРОМСВЯЗЬБАНК',EDIT_TOURIST_MAX_NAME_DIFF:'Запрещено редактировать более %d букв в имени туриста',CL_R_RES_A_PLAT_POR:'платежное поручение',PSBANK_BANK:'Не выбран банк для оплаты',INVALID_PAYER_AMOUNT:'Ошибка при вводе суммы для оплаты',NO_CLAIM_PAYMENT:'Не указана сумма оплаты',PAYER_AMOUNT_BIG:'Вы можете оплатить не более',INVALID_REWARD_AMOUNT:'Ошибка при вводе суммы вознаграждения',NO_REWARD:'Не указана сумма вознаграждения',NO_REWARD_SUNMAR:'Сумма вознаграждения не может быть меньше чем 1у.е.',REWARD_AMOUNT_BIG:'Ваше вознаграждение не может превышать',CL_W_NO_DATE_BEG:'Не определена дата начала тура',CL_W_NO_DATE_END:'Не определена дата окончания тура',CL_W_NO_TOUR:'Не определен тур',CL_W_NO_TOURIST:'Не определены туристы',CL_W_PART_EMPTY_ORDER:'Обнаружены заказы с неприкрепленными туристами. Вы хотите сохранить такие заказы?',CL_W_NO_CHHOSE_MEAL:'Не определено питание',CL_W_NO_CHHOSE_FREIGHT:'Не определен транспорт',CL_W_NO_CHHOSE_SERVICE:'Не определена доп.услуга',CL_W_NO_CHHOSE_INSURE:'Не определена страховка',CL_W_NO_CHHOSE_VISA:'Не определена виза',CL_W_EMPTY:'Свободно',CL_W_NO_ORDER:'Не определены заказы',CL_W_NO_REQUIRED_FILEDS:'Для данного тура необходимо уточнить данные о туристах',CL_W_CALC_PRICE:'Цена составляет:',CL_W_CALC_SPO:'специальное предложение:',CL_W_BRON_RESULT:'Ваша заявка забронирована',CL_W_BRON_RESULT_CLAIM:'Номер вашей заявки:',CL_W_CONFIRM_UNLINK_TOURIST:'Турист прикреплен к заказам. Открепить туриста автоматически от всех заказов?',CL_W_FULL_ORDER:'Заказ заполнен полностью',CL_W_FULL_ADULT_ORDER:'Количество взрослых в заказе ограничено.',CL_W_FULL_CHILD_ORDER:'Количество детей в заказе ограничено.',CL_W_FULL_INFANT_ORDER:'Количество младенцев в заказе ограничено.',CL_W_ASK_DELETE_TOURIST:'Удалить туриста?',CL_W_ASK_DELETE_ORDER:'Удалить заказ?',CL_W_ASK_LOAD_ORDER:'Система загрузит доп.услуги, страховки и визы.\r\nЗагрузить?',CL_W_NO_HOTEL_FOR_LOAD_PACKET:'Не заказана гостиница',CHILD_AGES:'возраст детей',CONFIRM_SAVE:'Я уверен(а), что анкета заполнена верно',XXX:''});})(samo.jQuery);function Translit()
{this.enabled=true;}
Translit.prototype.UrlTranslit=function(str,allow_slashes)
{var slash="",x=0;if(allow_slashes)slash="\\/";var LettersFrom="абвгдезиклмнопрстуфыэйхё";var LettersTo="abvgdeziklmnoprstufyejxe";var Consonant="бвгджзйклмнпрстфхцчшщ";var Vowel="аеёиоуыэюя";var BiLetters={"ж":"zh","ц":"ts","ч":"ch","ш":"sh","щ":"sch","ю":"ju","я":"ja"};str=str.replace(/[_\s\.,?!\[\](){}]+/g,"_");str=str.replace(/-{2,}/g,"--");str=str.replace(/_\-+_/g,"--");str=str.toLowerCase();str=str.replace(new RegExp("(ь|ъ)(["+Vowel+"])","g"),"j$2");str=str.replace(/(ь|ъ)/g,"");var _str="";for(x=0;x<str.length;x++){if((index=LettersFrom.indexOf(str.charAt(x)))>-1){_str+=LettersTo.charAt(index);}else{_str+=str.charAt(x);}}
str=_str;_str="";for(x=0;x<str.length;x++){if(BiLetters[str.charAt(x)]){_str+=BiLetters[str.charAt(x)];}else{_str+=str.charAt(x);}}
str=_str;str=str.replace(/j{2,}/g,"j");str=str.replace(new RegExp("[^"+slash+"0-9a-z_\\-`]+","g"),"");return str;};Translit.prototype.Supertag=function(str,allow_slashes)
{var slash="";if(allow_slashes)slash="\\/";str=this.UrlTranslit(str,allow_slashes);str=str.replace(new RegExp("[^"+slash+"0-9a-zA-Z\\-]+","g"),"");str=str.replace(/[\-_]+/g,"-");str=str.replace(/-+$/g,"");return str;};Translit.prototype.BiDiTranslit=function(str,direction_decode,allow_slashes)
{var Tran={"А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"JO","Ж":"ZH","З":"Z","И":"I","Й":"JJ","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"KH","Ц":"C","Ч":"CH","Ш":"SH","Щ":"SHH","Ъ":"_~","Ы":"Y","Ь":"_'","Э":"EH","Ю":"JU","Я":"JA","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"jo","ж":"zh","з":"z","и":"i","й":"jj","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"kh","ц":"c","ч":"ch","ш":"sh","щ":"shh","ъ":"~","ы":"y","ь":"'","э":"eh","ю":"ju","я":"ja"," ":"__","_":"__"};var DeTran={"SHH":"Щ","CH":"Ч","SH":"Ш","EH":"Э","JU":"Ю","_'":"Ь","_~":"Ъ","JO":"Ё","ZH":"Ж","JJ":"Й","KH":"Х","JA":"Я","A":"А","B":"Б","V":"В","G":"Г","D":"Д","E":"Е","Z":"З","I":"И","K":"К","L":"Л","M":"М","N":"Н","O":"О","P":"П","R":"Р","S":"С","T":"Т","U":"У","F":"Ф","C":"Ц","Y":"Ы","shh":"щ","jo":"ё","zh":"ж","jj":"й","kh":"х","ch":"ч","sh":"ш","ju":"ю","ja":"я","__":" ","eh":"э","a":"а","b":"б","v":"в","g":"г","d":"д","e":"е","z":"з","i":"и","k":"к","l":"л","m":"м","n":"н","o":"о","p":"п","r":"р","s":"с","t":"т","u":"у","f":"ф","c":"ц","~":"ъ","y":"ы","'":"ь"};var result="",k=0,i=0;if(!direction_decode)
{str=str.replace(/[^\/\- _0-9a-zа-яА-ЯёЁ]/gi,"");if(!allow_slashes)str=str.replace(/[^\/]/i,"");var is_rus=new RegExp("[а-яА-ЯёЁ ]","i");var lang_eng=true;var _lang_eng=true;var temp;for(i=0;i<str.length;i++)
{_lang_eng=lang_eng;temp=String(str.charAt(i));if(temp.replace(is_rus,"")==temp){lang_eng=true;}else
{lang_eng=false;temp=Tran[temp];}
if(lang_eng!=_lang_eng)temp="+"+temp;result+=temp;}}
else
{var pgs=str.split("/");var DeTranRegex=new Array();for(k in DeTran)
DeTranRegex[k]=new RegExp(k,"g");for(var j=0;j<pgs.length;j++)
{var strings=pgs[j].split("+");for(i=1;i<strings.length;i+=2){for(k in DeTran){strings[i]=strings[i].replace(DeTranRegex[k],DeTran[k]);}}
pgs[j]=strings.join("");}
result=pgs.join(allow_slashes?"/":":");}
return result.replace(/\/+$/,"");};String.prototype.translit=function(){return(new Translit).UrlTranslit(this,1).replace('_',' ');};(function($){$.controlValue=function(element){var useGET=arguments[1]||false,$context=(arguments.length>=3)?arguments[2]:$(document);if(typeof element=='string'){element=$('.'+element,$context).get(0);}
var tag=element.tagName.toLowerCase();if(tag=='select'){var multiple=(element.type=='select-multiple')?true:false;if(multiple){var result=[];$('option:selected',$(element)).each(function(){var val=$(this).val();if(val!="0"){result.push(val);}});return result.join(',');}else{return($(element).is('.string')&&$(element).val())?$.trim($(element).val()):parseInt($(element).val())||parseInt($.getParameter(element.name,useGET));}}else{if(tag=='input'){var type=element.type;switch(type){case'checkbox':case'radio':return(element.checked==true)?1:0;case'button':case'image':return null;case'text':case'hidden':if($(element).is('.date')){var $return=null;if(element.value&&!useGET){$return=Date.fromString(element.value);}else{var tmp=$.getParameter(element.name,useGET);if(tmp)$return=Date.fromString(tmp,'yyyymmdd');}
return($return)?$return.asString('yyyymmdd'):0;}else{if($(element).is('.string')||$(element).is('.text')){return $(element).val()||$.getParameter(element.id,useGET)||'';}}
default:return parseInt($(element).val())||parseInt($.getParameter(element.name,useGET));}}else{if(tag=='div'){if($(element).is('.checklistbox')){var result=[],value=$(element).checklistbox_value()
if(value){return value;}
value=$.getParameter(element.name||$(element).attr('name'),useGET);var values=String(value).split(',');$.each(values,function(){var el=parseInt(this);if(el){result.push(el);}});return result.join(',');}}}}
return parseInt($(element).val())||parseInt($.getParameter(element.name,useGET));};$.radioValue=function(name){return $("input[@name="+name+"][@type=radio][@checked]").val();};var QueryStringObj=function(){this.params={};var self=this;$(document.location.search.substring(1).split('&')).each(function(){var tmp=this.split('=');if(tmp.length==2){self.params[tmp[0]]=tmp[1];}});this.get=function(param){return this.params[param]||0;};};$.getParameter=function(param,useGET){if(!useGET)return 0;var vars=(new QueryStringObj);return vars.get(param);};})(samo.jQuery);if(!("console"in window)){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i)window.console[names[i]]=function(){};names=undefined;}
(function(){if(!window.XMLHttpRequest){samo.xhr_ax_object="Microsoft.XMLHttp";var xhr=null;var progIDs=["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp"];for(currentProgID=progIDs.length;currentProgID>0;currentProgID--){try{samo.xhr_ax_object=progIDs[currentProgID];xhr=(new ActiveXObject(samo.xhr_ax_object));break;}catch(e){}}
if(xhr==null){document.location.href=samo.ROUTES.WWWROOT+"/public/xhr.html";}}
samo.xhr=function(){var xhr=null;xhr=(window.XMLHttpRequest)?(new XMLHttpRequest()):(new ActiveXObject(samo.xhr_ax_object));return xhr;};})();(function($){$(function(){if($.browser.msie){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}
$.require=function($url,callback){$.ajaxSettings.cache=true;$.ajaxSettings.scriptCharset='windows-1251';$.getScript($url,callback);$.ajaxSettings.cache=false;};samo.controls={};$('body').append('<div id="preloader">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '+samo.LANG.LOADING+'&hellip;</div>');samo.preloader=$('#preloader');samo.loadBtn=$('.load');$(document).ajaxStart(function(){samo.preloader.css('display','block');samo.loadBtn.attr('disabled',true);}).ajaxStop(function(){samo.preloader.css('display','none');samo.loadBtn.removeAttr('disabled');});$.ajaxSetup({error:function(xhr,status,e){if('timeout'==status){alert(samo.LANG.TIMEOUT_ERROR);}},timeout:60000});$('#logout').bind('click',function(){$.getScript(samo.ROOT_URL+'samo_action=LOGOUT');});samo.loadBtn.removeAttr('disabled');$('.samo_container input.date').livequery('blur',function(e){if($(this).val().length){var tmp=Date.fromString($(this).val());if(tmp){var year=tmp.getFullYear();if(year<1901||year>2038){e.preventDefault();var self=$(this);setTimeout(function(){self.addClass('error').select().get(0).focus();},13);return false;}else{$(this).removeClass('error');}
tmp=tmp.asString();}
if(tmp&&tmp!=$(this).val()){$(this).val(tmp);if(typeof $(this).dpSetSelected=='function'){$(this).dpSetSelected(tmp);}}}});});samo.checkStateAndTownfrom=function($module_container){var is_ok=true;$('.STATEINC,.TOWNFROMINC',$module_container).each(function(){if(!$.controlValue(this)){is_ok=false;alert(samo.LANG['NOT_SET_'+this.name]);this.focus();return false;}});return is_ok;};samo.cache_controls=function($module_container){$('input,select,div.resultset,div.checklistbox,div.FREIGHTSINFO,div.ASERVICES,div.TOURISTS,div.TOURINFO,div.INSURESINFO,div.CLAIMPRICE,div.COMMISSIONS,div.HOTELSINFO',$module_container).each(function(){var name=this.name||$(this).attr('name')||this.className;samo.controls[name]=this;});};samo.recaptcha=function(){var $cap=$('#icaptcha'),$src=$cap.attr('src').replace(/_=\d+/,'');$cap.attr('src',$src+'_='+Number(new Date())).bind('load',function(){$('#fcaptcha').val('');});};samo.logon_box=function(){if($('#login').length){$('#login').get(0).focus();$('#loginForm').bind('submit',function(e){e.preventDefault();e.stopPropagation();var params={samo_action:'logon',logon_key:$('#logon_key').val()},is_ok=true;$('#login,#passwd').each(function(){var self=$(this);if(!self.val()){is_ok=false;self.addClass('error').get(0).focus();}else{params[this.name]=this.value;self.removeClass('error');}});if(is_ok){$.post($('#loginbox').attr('samo:orig_url'),params,null,'script');}
return false;});}
$('#captchaForm').bind('submit',function(e){e.preventDefault();e.stopPropagation();var $captcha=$('#fcaptcha'),captcha=$captcha.val();if(captcha.length){$captcha.removeClass('error');var params={samo_action:'antibot',are_you_human:captcha};$.post($('#captchabox').attr('samo:orig_url'),params,null,'script');}else{$captcha.addClass('error');}
return false;}).find('#recaptcha').bind('click',samo.recaptcha);};samo.logon_error=function(msg){samo.recaptcha();alert(msg);$('#passwd').get(0).select();};})(samo.jQuery);}