/*

grafica

*/

// IE5.5+ PNG Alpha Fix v2.0 Alpha: Background Tiling Support
// (c) 2008 Angus Turnbull http://www.twinhelix.com

// This is licensed under the GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

var IEPNGFix = window.IEPNGFix || {};

IEPNGFix.tileBG = function(elm, pngSrc, ready) {
	// Params: A reference to a DOM element, the PNG src file pathname, and a
	// hidden "ready-to-run" passed when called back after image preloading.

	var data = this.data[elm.uniqueID],
		elmW = Math.max(elm.clientWidth, elm.scrollWidth),
		elmH = Math.max(elm.clientHeight, elm.scrollHeight),
		bgX = elm.currentStyle.backgroundPositionX,
		bgY = elm.currentStyle.backgroundPositionY,
		bgR = elm.currentStyle.backgroundRepeat;

	// Cache of DIVs created per element, and image preloader/data.
	if (!data.tiles) {
		data.tiles = {
			elm: elm,
			src: '',
			cache: [],
			img: new Image(),
			old: {}
		};
	}
	var tiles = data.tiles,
		pngW = tiles.img.width,
		pngH = tiles.img.height;

	if (pngSrc) {
		if (!ready && pngSrc != tiles.src) {
			// New image? Preload it with a callback to detect dimensions.
			tiles.img.onload = function() {
				this.onload = null;
				IEPNGFix.tileBG(elm, pngSrc, 1);
			};
			return tiles.img.src = pngSrc;
		}
	} else {
		// No image?
		if (tiles.src) ready = 1;
		pngW = pngH = 0;
	}
	tiles.src = pngSrc;

	if (!ready && elmW == tiles.old.w && elmH == tiles.old.h &&
		bgX == tiles.old.x && bgY == tiles.old.y && bgR == tiles.old.r) {
		return;
	}

	// Convert English and percentage positions to pixels.
	var pos = {
			top: '0%',
			left: '0%',
			center: '50%',
			bottom: '100%',
			right: '100%'
		},
		x,
		y,
		pc;
	x = pos[bgX] || bgX;
	y = pos[bgY] || bgY;
	if (pc = x.match(/(\d+)%/)) {
		x = Math.round((elmW - pngW) * (parseInt(pc[1]) / 100));
	}
	if (pc = y.match(/(\d+)%/)) {
		y = Math.round((elmH - pngH) * (parseInt(pc[1]) / 100));
	}
	x = parseInt(x);
	y = parseInt(y);

	// Handle backgroundRepeat.
	var repeatX = { 'repeat': 1, 'repeat-x': 1 }[bgR],
		repeatY = { 'repeat': 1, 'repeat-y': 1 }[bgR];
	if (repeatX) {
		x %= pngW;
		if (x > 0) x -= pngW;
	}
	if (repeatY) {
		y %= pngH;
		if (y > 0) y -= pngH;
	}

	// Go!
	this.hook.enabled = 0;
	if (!({ relative: 1, absolute: 1 }[elm.currentStyle.position])) {
		elm.style.position = 'relative';
	}
	var count = 0,
		xPos,
		maxX = repeatX ? elmW : x + 0.1,
		yPos,
		maxY = repeatY ? elmH : y + 0.1,
		d,
		s,
		isNew;
	if (pngW && pngH) {
		for (xPos = x; xPos < maxX; xPos += pngW) {
			for (yPos = y; yPos < maxY; yPos += pngH) {
				isNew = 0;
				if (!tiles.cache[count]) {
					tiles.cache[count] = document.createElement('div');
					isNew = 1;
				}
				var clipR = (xPos + pngW > elmW ? elmW - xPos : pngW),
					clipB = (yPos + pngH > elmH ? elmH - yPos : pngH);
				d = tiles.cache[count];
				s = d.style;
				s.behavior = 'none';
				s.left = xPos + 'px';
				s.top = yPos + 'px';
				s.width = clipR + 'px';
				s.height = clipB + 'px';
				s.clip = 'rect(' +
					(yPos < 0 ? 0 - yPos : 0) + 'px,' +
					clipR + 'px,' +
					clipB + 'px,' +
					(xPos < 0 ? 0 - xPos : 0) + 'px)';
				s.display = 'block';
				if (isNew) {
					s.position = 'absolute';
					s.zIndex = -999;
					if (elm.firstChild) {
						elm.insertBefore(d, elm.firstChild);
					} else {
						elm.appendChild(d);
					}
				}
				this.fix(d, pngSrc, 0);
				count++;
			}
		}
	}
	while (count < tiles.cache.length) {
		this.fix(tiles.cache[count], '', 0);
		tiles.cache[count++].style.display = 'none';
	}

	this.hook.enabled = 1;

	// Cache so updates are infrequent.
	tiles.old = {
		w: elmW,
		h: elmH,
		x: bgX,
		y: bgY,
		r: bgR
	};
};


IEPNGFix.update = function() {
	// Update all PNG backgrounds.
	for (var i in IEPNGFix.data) {
		var t = IEPNGFix.data[i].tiles;
		if (t && t.elm && t.src) {
			IEPNGFix.tileBG(t.elm, t.src);
		}
	}
};
IEPNGFix.update.timer = 0;

if (window.attachEvent && !window.opera) {
	window.attachEvent('onresize', function() {
		clearTimeout(IEPNGFix.update.timer);
		IEPNGFix.update.timer = setTimeout(IEPNGFix.update, 100);
	});
}





/************************************************************

jquery


*************************************************************/

/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
 * $Rev: 5685 $
 */
(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:"1.2.6",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(!elem)return;if(elem.constructor==Number)elem+='';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"}});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;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var 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(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];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();});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{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){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},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.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);};}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 remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){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=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();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{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}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,filter){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(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(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(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=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"){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.def;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.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&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,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){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(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;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];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();








/*

diverse

*/





////////////////////////

var highlightcolor="lightyellow"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}

function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
		thefield.value = ""
}

//bookmark
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}



/*

ajax

*/

//** Ajax Tabs Content script v2.0- ? Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Updated Oct 21st, 07 to version 2.0. Contains numerous improvements
//** Updated Feb 18th, 08 to version 2.1: Adds a public "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically. Only .js file changed from v2.0.
//** Updated April 8th, 08 to version 2.2:
//   -Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) 
//   -Modified Ajax routine so testing the script out locally in IE7 now works 

var ddajaxtabssettings={}
ddajaxtabssettings.bustcachevar=0  //bust potential caching of external pages after initial request? (1=yes, 0=no)
ddajaxtabssettings.loadstatustext="" 
//ddajaxtabssettings.loadstatustext="<img src='js_ajaxtabs/loading.gif' /> Se incarca ..." 
 

////NO NEED TO EDIT BELOW////////////////////////

function ddajaxtabs(tabinterfaceid, contentdivid){
	//alert(this)
	//if(tabinterfaceid=="maintab2"){alert(document.getElementById("tcontent_as").innerHTML)}
	this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
	this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
	this.enabletabpersistence=true
	this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
	this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
	this.contentdivid=contentdivid
	this.defaultHTML=""
	this.defaultIframe='<iframe src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" class="tabcontentiframe" style="width:100%; height:auto; min-height: 100px"></iframe>'
	this.defaultIframe=this.defaultIframe.replace(/<iframe/i, '<iframe name="'+"_ddajaxtabsiframe-"+contentdivid+'" ')
this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
	this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}

ddajaxtabs.connect=function(pageurl, tabinstance){
	var page_request = false
	var bustcacheparameter=""
	if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken)
		try {
		page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
			page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else if (window.XMLHttpRequest) // if Mozilla, Safari etc
		page_request = new XMLHttpRequest()
	else
		return false
	var ajaxfriendlyurl=pageurl.replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/") 
	page_request.onreadystatechange=function(){ddajaxtabs.loadpage(page_request, pageurl, tabinstance)}
	if (ddajaxtabssettings.bustcachevar) //if bust caching of external page
		bustcacheparameter=(ajaxfriendlyurl.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', ajaxfriendlyurl+bustcacheparameter, true)
	page_request.send(null)
}

ddajaxtabs.loadpage=function(page_request, pageurl, tabinstance){
	var divId=tabinstance.contentdivid
	document.getElementById(divId).innerHTML=ddajaxtabssettings.loadstatustext //Display "fetching page message"
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
		document.getElementById(divId).innerHTML=page_request.responseText
		ddajaxtabs.ajaxpageloadaction(pageurl, tabinstance)
	}
}

ddajaxtabs.ajaxpageloadaction=function(pageurl, tabinstance){
	tabinstance.onajaxpageload(pageurl) //call user customized onajaxpageload() function when an ajax page is fetched/ loaded
}

ddajaxtabs.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

ddajaxtabs.setCookie=function(name, value){
	document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
}

ddajaxtabs.prototype={

	expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
		this.cancelautorun() //stop auto cycling of tabs (if running)
		var tabref=""
		try{
			if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
				tabref=document.getElementById(tabid_or_position)
			else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
				tabref=this.tabs[tabid_or_position]
		}
		catch(err){alert("Invalid Tab ID or position entered!")}
		if (tabref!="") //if a valid tab is found based on function parameter
			this.expandtab(tabref) //expand this tab
	},

	cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
		if (dir=="next"){
			var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
		}
		else if (dir=="prev"){
			var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
		}
		if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
			this.cancelautorun() //stop auto cycling of tabs (if running)
		this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
	},

	setpersist:function(bool){ //PUBLIC function to toggle persistence feature
			this.enabletabpersistence=bool
	},

	loadajaxpage:function(pageurl){ //PUBLIC function to fetch a page via Ajax and display it within the Tab Content instance's container
		ddajaxtabs.connect(pageurl, this)
	},

	loadiframepage:function(pageurl){ //PUBLIC function to fetch a page and load it into the IFRAME of the Tab Content instance's container
		this.iframedisplay(pageurl, this.contentdivid)
	},

	setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
		this.selectedClassTarget=objstr || "link"
	},

	getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
		return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
	},

	urlparamselect:function(tabinterfaceid){
		var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
		return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
	},

	onajaxpageload:function(pageurl){ //PUBLIC Event handler that can invoke custom code whenever an Ajax page has been fetched and displayed
		//do nothing by default
	},

	expandtab:function(tabref){
		var relattrvalue=tabref.getAttribute("rel")
		//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easy searching through
		var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
		if (relattrvalue=="#default")
			document.getElementById(this.contentdivid).innerHTML=this.defaultHTML
		else if (relattrvalue=="#iframe")
			this.iframedisplay(tabref.getAttribute("href"), this.contentdivid)
		else
			ddajaxtabs.connect(tabref.getAttribute("href"), this)
		this.expandrevcontent(associatedrevids)
		for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
			this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("href")==tabref.getAttribute("href"))? "selected" : ""
		}
		if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
			ddajaxtabs.setCookie(this.tabinterfaceid, tabref.tabposition)
		this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
	},

	iframedisplay:function(pageurl, contentdivid){
		if (typeof window.frames["_ddajaxtabsiframe-"+contentdivid]!="undefined"){
			try{delete window.frames["_ddajaxtabsiframe-"+contentdivid]} //delete iframe within Tab content container if it exists (due to bug in Firefox)
			catch(err){}
		}
		document.getElementById(contentdivid).innerHTML=this.defaultIframe
		window.frames["_ddajaxtabsiframe-"+contentdivid].location.replace(pageurl) //load desired page into iframe
	},


	expandrevcontent:function(associatedrevids){
		var allrevids=this.revcontentids
		for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
			//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
			document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
		}
	},

	setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
		for (var i=0; i<this.hottabspositions.length; i++){
			if (tabposition==this.hottabspositions[i]){
				this.currentTabIndex=i
				break
			}
		}
	},

	autorun:function(){ //function to auto cycle through and select tabs based on a set interval
		this.cycleit('next', true)
	},

	cancelautorun:function(){
		if (typeof this.autoruntimer!="undefined")
			clearInterval(this.autoruntimer)
	},

	init:function(automodeperiod){
		var persistedtab=ddajaxtabs.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
		var selectedtab=-1 //Currently selected tab index (-1 meaning none)
		var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
		this.automodeperiod=automodeperiod || 0
		this.defaultHTML=document.getElementById(this.contentdivid).innerHTML
		for (var i=0; i<this.tabs.length; i++){
			this.tabs[i].tabposition=i //remember position of tab relative to its peers
			if (this.tabs[i].getAttribute("rel")){
				var tabinstance=this
				this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
				this.tabs[i].onclick=function(){
					tabinstance.expandtab(this)
					tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
					return false
				}
				if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
					this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
				}
				if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
					selectedtab=i //Selected tab index, if found
				}
			}
		} //END for loop
		if (selectedtab!=-1) //if a valid default selected tab index is found
			this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
		else //if no valid default selected index found
			this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
		if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
			this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
		}
	} //END int() function

} //END Prototype assignment


	subject_id = '';
	function handleHttpResponse() {
		//document.getElementById(subject_id).innerHTML="<img src='images/loading.gif' /> Se incarca ...";
		document.getElementById(subject_id).innerHTML="";
		if (http.readyState == 4 ) {
			if (subject_id != '') {
				document.getElementById(subject_id).innerHTML = http.responseText;
			}
		}
	}
	function getHTTPObject() {
		var xmlhttp;
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest();
			} catch (e) {
				xmlhttp = false;
			}
		}
		return xmlhttp;
	}
	var http = getHTTPObject(); 
 
function newdiv(div_afisare,page)
		{
			subject_id = div_afisare;
			switch(page){
				case 1:
					//da eroare in IE6
					http.open("GET", "banners/banners_right.php", true);
					break;
			}
			http.onreadystatechange = handleHttpResponse;
			http.send(null);
		}


function divs(){
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
	var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
	 //if (ieversion>=8)
	 // versiunea 8.x
	 if (ieversion>=7)
	  setTimeout("newdiv('banners_right',1)",1000);
	//else if (ieversion>=6)
	 // versiunea 6.x
	// else if (ieversion>=5)
	  // versiunea 5.x
}
//else{}
	//setTimeout("newdiv('banners_right',1)",1000);
	
}

//divs()



/*

jquery

*/


/*
 * SimpleModal newsletterajax Form
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2008 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: newsletterajax.js 170 2008-12-04 19:03:12Z emartin24 $
 *
 */

$(document).ready(function () {
	$('#NewsletterForm input.newsletterajax, #NewsletterForm a.newsletterajax').click(function (e) {
		e.preventDefault();
		// load the newsletterajax form using ajax
		$.get("data/contact.php", function(data){
			// create a modal dialog with the data
			$(data).modal({
				close: false,
				position: ["15%",],
				overlayId: 'newsletterajax-overlay',
				containerId: 'newsletterajax-container',
				onOpen: newsletterajax.open,
				onShow: newsletterajax.show,
				onClose: newsletterajax.close
			});
		});
	});

	// preload images
	//var img = ['cancel.png', 'form_bottom.gif', 'form_top.gif', 'loading.gif', 'send.png'];
	/*var img = [''];
	$(img).each(function () {
		var i = new Image();
		i.src = 'img/newsletterajax/' + this;
	});*/
});

var newsletterajax = {
	message: null,
	open: function (dialog) {
		// add padding to the buttons in firefox/mozilla
		if ($.browser.mozilla) {
			$('#newsletterajax-container .newsletterajax-button').css({
				'padding-bottom': '2px'
			});
		}
		// input field font size
		if ($.browser.safari) {
			$('#newsletterajax-container .newsletterajax-input').css({
				'font-size': '.9em'
			});
		}

		// dynamically determine height
		var h = 280;
		if ($('#newsletterajax-subject').length) {
			h += 26;
		}
		if ($('#newsletterajax-cc').length) {
			h += 22;
		}

		var title = $('#newsletterajax-container .newsletterajax-title').html();
		$('#newsletterajax-container .newsletterajax-title').html('Se incarca...');
		dialog.overlay.fadeIn(200, function () {
			dialog.container.fadeIn(200, function () {
				dialog.data.fadeIn(200, function () {
					$('#newsletterajax-container .newsletterajax-content').animate({
						height: h
					}, function () {
						$('#newsletterajax-container .newsletterajax-title').html(title);
						$('#newsletterajax-container form').fadeIn(200, function () {
							$('#newsletterajax-container #newsletterajax-name').focus();

							$('#newsletterajax-container .newsletterajax-cc').click(function () {
								var cc = $('#newsletterajax-container #newsletterajax-cc');
								cc.is(':checked') ? cc.attr('checked', '') : cc.attr('checked', 'checked');
							});

							// fix png's for IE 6
							if ($.browser.msie && $.browser.version < 7) {
								$('#newsletterajax-container .newsletterajax-button').each(function () {
									if ($(this).css('backgroundImage').match(/^url[("']+(.*\.png)[)"']+$/i)) {
										var src = RegExp.$1;
										$(this).css({
											backgroundImage: 'none',
											filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' +  src + '", sizingMethod="crop")'
										});
									}
								});
							}
						});
					});
				});
			});
		});
	},
	show: function (dialog) {
		$('#newsletterajax-container .newsletterajax-send').click(function (e) {
			e.preventDefault();
			// validate form
			if (newsletterajax.validate()) {
				$('#newsletterajax-container .newsletterajax-message').fadeOut(function () {
					$('#newsletterajax-container .newsletterajax-message').removeClass('newsletterajax-error').empty();
				});
				$('#newsletterajax-container .newsletterajax-title').html('Sending...');
				$('#newsletterajax-container form').fadeOut(200);
				$('#newsletterajax-container .newsletterajax-content').animate({
					height: '80px'
				}, function () {
					$('#newsletterajax-container .newsletterajax-loading').fadeIn(200, function () {
						$.ajax({
							url: 'data/contact.php',
							data: $('#newsletterajax-container form').serialize() + '&action=send',
							type: 'post',
							cache: false,
							dataType: 'html',
							complete: function (xhr) {
								$('#newsletterajax-container .newsletterajax-loading').fadeOut(200, function () {
									$('#newsletterajax-container .newsletterajax-title').html('Multumin!');
									$('#newsletterajax-container .newsletterajax-message').html(xhr.responseText).fadeIn(200);
								});
							},
							error: newsletterajax.error
						});
					});
				});
			}
			else {
				if ($('#newsletterajax-container .newsletterajax-message:visible').length > 0) {
					var msg = $('#newsletterajax-container .newsletterajax-message div');
					msg.fadeOut(200, function () {
						msg.empty();
						newsletterajax.showError();
						msg.fadeIn(200);
					});
				}
				else {
					$('#newsletterajax-container .newsletterajax-message').animate({
						height: '30px'
					}, newsletterajax.showError);
				}
				
			}
		});
	},
	close: function (dialog) {
		$('#newsletterajax-container .newsletterajax-message').fadeOut();
		$('#newsletterajax-container .newsletterajax-title').html('O zi buna...');
		$('#newsletterajax-container form').fadeOut(200);
		$('#newsletterajax-container .newsletterajax-content').animate({
			height: 40
		}, function () {
			dialog.data.fadeOut(200, function () {
				dialog.container.fadeOut(200, function () {
					dialog.overlay.fadeOut(200, function () {
						$.modal.close();
					});
				});
			});
		});
	},
	error: function (xhr) {
		alert(xhr.statusText);
	},
	validate: function () {
		newsletterajax.message = '';
		/*if (!$('#newsletterajax-container #newsletterajax-name').val()) {
			newsletterajax.message += 'Name is required. ';
		}*/

		var email = $('#newsletterajax-container #newsletterajax-email').val();
		if (!email) {
			newsletterajax.message += 'Nu ati completat emailul!. ';
		}
		else {
			if (!newsletterajax.validateEmail(email)) {
				newsletterajax.message += 'Emailul nu este valid. ';
			}
		}

		/*if (!$('#newsletterajax-container #newsletterajax-message').val()) {
			newsletterajax.message += 'Message is required.';
		}*/

		if (newsletterajax.message.length > 0) {
			return false;
		}
		else {
			return true;
		}
	},
	validateEmail: function (email) {
		var at = email.lastIndexOf("@");

		// Make sure the at (@) sybmol exists and  
		// it is not the first or last character
		if (at < 1 || (at + 1) === email.length)
			return false;

		// Make sure there aren't multiple periods together
		if (/(\.{2,})/.test(email))
			return false;

		// Break up the local and domain portions
		var local = email.substring(0, at);
		var domain = email.substring(at + 1);

		// Check lengths
		if (local.length < 1 || local.length > 64 || domain.length < 4 || domain.length > 255)
			return false;

		// Make sure local and domain don't start with or end with a period
		if (/(^\.|\.$)/.test(local) || /(^\.|\.$)/.test(domain))
			return false;

		// Check for quoted-string addresses
		// Since almost anything is allowed in a quoted-string address,
		// we're just going to let them go through
		if (!/^"(.+)"$/.test(local)) {
			// It's a dot-string address...check for valid characters
			if (!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(local))
				return false;
		}

		// Make sure domain contains only valid characters and at least one period
		if (!/^[-a-zA-Z0-9\.]*$/.test(domain) || domain.indexOf(".") === -1)
			return false;	

		return true;
	},
	showError: function () {
		$('#newsletterajax-container .newsletterajax-message')
			.html($('<div class="newsletterajax-error">').append(newsletterajax.message))
			.fadeIn(200);
	}
};

/*
 * Interface elements for jQuery - http://interface.eyecon.ro
 *
 * Copyright (c) 2006 Stefan Petre
 * Dual licensed under the MIT (MIT-LICENSE.txt) 
 * and GPL (GPL-LICENSE.txt) licenses.
 */
 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('5.Q={4s:z(e,s){J l=0;J t=0;J 2E=0;J 2H=0;J w=5.G(e,\'2c\');J h=5.G(e,\'2d\');J Z=e.3C;J T=e.3H;3Y(e.3L){l+=e.2T+(e.1e?E(e.1e.35)||0:0);t+=e.38+(e.1e?E(e.1e.37)||0:0);9(s){2E+=e.1z.20||0;2H+=e.1z.1J||0}e=e.3L}l+=e.2T+(e.1e?E(e.1e.35)||0:0);t+=e.38+(e.1e?E(e.1e.37)||0:0);2H=t-2H;2E=l-2E;B{x:l,y:t,5u:2E,51:2H,w:w,h:h,Z:Z,T:T}},1Q:z(e){J x=0;J y=0;J 3I=g;Y=e.K;9(5(e).G(\'N\')==\'15\'){2X=Y.2l;31=Y.1i;Y.2l=\'3p\';Y.N=\'1O\';Y.1i=\'2S\';3I=C}A=e;3Y(A){x+=A.2T+(A.1e&&!5.1R.39?E(A.1e.35)||0:0);y+=A.38+(A.1e&&!5.1R.39?E(A.1e.37)||0:0);A=A.3L}A=e;3Y(A&&A.54.55()!=\'12\'){x-=A.20||0;y-=A.1J||0;A=A.1z}9(3I){Y.N=\'15\';Y.1i=31;Y.2l=2X}B{x:x,y:y}},1K:z(e){J w=5.G(e,\'2c\');J h=5.G(e,\'2d\');J Z=0;J T=0;Y=e.K;9(5(e).G(\'N\')!=\'15\'){Z=e.3C;T=e.3H}S{2X=Y.2l;31=Y.1i;Y.2l=\'3p\';Y.N=\'1O\';Y.1i=\'2S\';Z=e.3C;T=e.3H;Y.N=\'15\';Y.1i=31;Y.2l=2X}B{w:w,h:h,Z:Z,T:T}},4B:z(e){9(e){w=e.2n;h=e.2N}S{2p=I.1h;w=23.3J||33.3J||(2p&&2p.2n)||I.12.2n;h=23.3K||33.3K||(2p&&2p.2N)||I.12.2N}B{w:w,h:h}},57:z(e){9(e){t=e.1J;l=e.20;w=e.3x;h=e.3o;3a=0;34=0}S{9(I.1h&&I.1h.1J){t=I.1h.1J;l=I.1h.20;w=I.1h.3x;h=I.1h.3o}S 9(I.12){t=I.12.1J;l=I.12.20;w=I.12.3x;h=I.12.3o}3a=33.3J||I.1h.2n||I.12.2n||0;34=33.3K||I.1h.2N||I.12.2N||0}B{t:t,l:l,w:w,h:h,3a:3a,34:34}},4t:z(e,2e){A=5(e);t=A.G(\'2A\')||\'\';r=A.G(\'2x\')||\'\';b=A.G(\'2D\')||\'\';l=A.G(\'2L\')||\'\';9(2e)B{t:E(t)||0,r:E(r)||0,b:E(b)||0,l:E(l)};S B{t:t,r:r,b:b,l:l}},5p:z(e,2e){A=5(e);t=A.G(\'5a\')||\'\';r=A.G(\'5b\')||\'\';b=A.G(\'5c\')||\'\';l=A.G(\'5d\')||\'\';9(2e)B{t:E(t)||0,r:E(r)||0,b:E(b)||0,l:E(l)};S B{t:t,r:r,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(8.6.L.1a==4f){9(8.6.L==\'2W\'){8.6.11=5.1x({x:0,y:0},5.Q.1K(8.1z));2J=5.Q.2Q(8.1z,C);8.6.11.w=8.6.11.Z-2J.l-2J.r;8.6.11.h=8.6.11.T-2J.t-2J.b}S 9(8.6.L==\'I\'){3T=5.Q.4B();8.6.11={x:0,y:0,w:3T.w,h:3T.h}}}S 9(8.6.L.1a==4g){8.6.11={x:E(8.6.L[0])||0,y:E(8.6.L[1])||0,w:E(8.6.L[2])||0,h:E(8.6.L[3])||0}}8.6.11.O=8.6.11.x-8.6.F.x;8.6.11.R=8.6.11.y-8.6.F.y},3g:z(7){9(7.6.2q||7.6.L==\'2W\'){5(\'12\',I).1I(5.j.D.H(0))}5.j.D.3S().5o().G(\'13\',1);9(23.3c){5.j.D.G(\'4C\',\'4D(13=4E)\')}},3d:z(e){5(I).3W(\'4F\',5.j.3i).3W(\'4H\',5.j.3d);9(5.j.7==P){B}7=5.j.7;5.j.7=P;9(7.6.2P==g){B g}9(7.6.1W==C){5(7).G(\'1i\',7.6.2j)}3e=7.K;9(7.1Y){5.j.D.G(\'46\',\'47\')}9(7.6.1N==g){9(7.6.M>0){9(!7.6.X||7.6.X==\'2C\'){x=4I 5.M(7,7.6.M,\'1f\');x.4J(7.6.10.x,7.6.2u)}9(!7.6.X||7.6.X==\'2G\'){y=4I 5.M(7,7.6.M,\'1g\');y.4J(7.6.10.y,7.6.2o)}}S{9(!7.6.X||7.6.X==\'2C\')7.K.1f=7.6.2u+\'1b\';9(!7.6.X||7.6.X==\'2G\')7.K.1g=7.6.2o+\'1b\'}5.j.3g(7);9(7.6.18==g){5(7).G(\'N\',7.6.2a)}}S 9(7.6.M>0){7.6.2O=C;9(5.v&&5.v.1j&&5.u){2f=5.Q.1Q(5.u.D.H(0))}S{2f=g}5.j.D.5r({1f:2f?2f.x:7.6.F.x,1g:2f?2f.y:7.6.F.y},7.6.M,z(){7.6.2O=g;9(7.6.18==g){7.K.N=7.6.2a}5.j.3g(7)})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.v&&5.v.2v>0){5.v.2R(7,1c)}B g},2h:z(o){9(!5.j.D){5(\'12\',I).1I(\'<36 U="45"></36>\');5.j.D=5(\'#45\');A=5.j.D.H(0);1L=A.K;1L.1i=\'2S\';1L.N=\'15\';1L.46=\'47\';1L.4R=\'15\';1L.4S=\'3p\';9(23.3c){A.4c=z(){B g};A.4e=z(){B g}}S{1L.4T=\'15\';1L.4U=\'15\'}}9(!o){o={}}B k.1m(z(){9(k.3w||!5.Q)B;9(23.3c){k.4c=z(){B g};k.4e=z(){B g}}J 3y=o.1E?5(k).4V(o.1E):5(k);k.6={1N:o.1N?C:g,18:o.18?C:g,1W:o.1W?o.1W:g,1Y:o.1Y?o.1Y:g,2q:o.2q?o.2q:g,2g:o.2g?E(o.2g)||0:g,13:o.13?3u(o.13):g,M:E(o.M)||P,1S:o.1S?o.1S:g,1C:{},W:{},1l:o.1l&&o.1l.1a==1T?o.1l:g,1d:o.1d&&o.1d.1a==1T?o.1d:g,1A:o.1A&&o.1A.1a==1T?o.1A:g,X:/2G|2C/.4p(o.X)?o.X:g,1X:o.1X?E(o.1X)||0:0,V:o.V?o.V:g,3r:o.3r?C:g};9(o.1C&&o.1C.1a==1T)k.6.1C.3s=o.1C;9(o.L&&((o.L.1a==4f&&(o.L==\'2W\'||o.L==\'I\'))||(o.L.1a==4g&&o.L.1k==4))){k.6.L=o.L}9(o.3v){k.6.3v=o.3v}9(o.1G){9(4X o.1G==\'4Y\'){k.6.26=E(o.1G)||1;k.6.2r=E(o.1G)||1}S 9(o.1G.1k==2){k.6.26=E(o.1G[0])||1;k.6.2r=E(o.1G[1])||1}}9(o.27&&o.27.1a==1T){k.6.27=o.27}k.3w=C;3y.H(0).2s=k;3y.3z(\'4h\',5.j.4i)})}};5.3B.1x({3X:5.j.32,3U:5.j.2h});5.v={4n:z(1u,1t,28,29){B 1u<=5.j.7.6.1w&&(1u+28)>=(5.j.7.6.1w+5.j.7.6.F.w)&&1t<=5.j.7.6.1n&&(1t+29)>=(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;5.u.2R(q)}}S{9(q.n.22&&q.n.h==C){q.n.22.1F(q,[e,1c,q.n.M])}9(q.n.1U){5.v.14[i].2K(q.n.1U);5.v.14[i].2z(q.n.1B)}q.n.h=g}}9(5.u&&5.v.1j==g){5.u.D.H(0).K.N=\'15\';5(\'12\').1I(5.u.D.H(0))}9(3A){5.v.1j.n.21.1F(5.v.1j,[e,1c])}},4l:z(e){J i;1v(i 1D 5.v.14){q=5.v.14[i].H(0);9(q.n.1B){5.v.14[i].2K(q.n.1B)}9(q.n.1U){5.v.14[i].2K(q.n.1U)}9(q.n.s){5.u.2k[5.u.2k.1k]=i}9(q.n.2M&&q.n.h==C){q.n.h=g;q.n.2M.1F(q,[e,q.n.M])}q.n.m=g;q.n.h=g}5.v.14={}},32:z(){B k.1m(z(){9(k.30){9(k.n.s){U=5.1y(k,\'U\');5.u.1s[U]=P;5(\'.\'+k.n.a,k).3X()}5.v.17[\'d\'+k.3G]=P;k.30=g;k.f=P}})},2h:z(o){B k.1m(z(){9(k.30==C||!o.1r||!5.Q||!5.j){B}k.n={a:o.1r,1B:o.3f,1U:o.3h,4m:o.1H,2M:o.4Z||o.2M,21:o.21||o.48,22:o.22||o.4d,t:o.1V&&(o.1V==\'4n\'||o.1V==\'4o\')?o.1V:\'W\',M:o.M?o.M:g,m:g,h:g};9(o.3q==C&&5.u){U=5.1y(k,\'U\');5.u.1s[U]=k.n.a;k.n.s=C;9(o.25){k.n.25=o.25;k.n.3D=5.u.3b(U).2Z}}k.30=C;k.3G=E(1p.52()*53);5.v.17[\'d\'+k.3G]=5(k);5.v.2v++})}};5.3B.1x({56:5.v.32,4G:5.v.2h});5.58=5.v.4q;5.u={2k:[],1s:{},D:g,24:P,4r:z(){9(5.j.7==P){B}J i;5.u.D.H(0).2y=5.j.7.6.1S;1o=5.u.D.H(0).K;1o.N=\'1O\';5.u.D.F=5.Q.4s(5.u.D.H(0));1o.2c=5.j.7.6.F.Z+\'1b\';1o.2d=5.j.7.6.F.T+\'1b\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Q(k))})},3b:z(s){J i;J h=\'\';J o={};9(s){9(5.u.1s[s]){o[s]=[];5(\'#\'+s+\' .\'+5.u.1s[s]).1m(z(){9(h.1k>0){h+=\'&\'}h+=s+\'[]=\'+5.1y(k,\'U\');o[s][o[s].1k]=5.1y(k,\'U\')})}S{1v(a 1D s){9(5.u.1s[s[a]]){o[s[a]]=[];5(\'#\'+s[a]+\' .\'+5.u.1s[s[a]]).1m(z(){9(h.1k>0){h+=\'&\'}h+=s[a]+\'[]=\'+5.1y(k,\'U\');o[s[a]][o[s[a]].1k]=5.1y(k,\'U\')})}}}}S{1v(i 1D 5.u.1s){o[i]=[];5(\'#\'+i+\' .\'+5.u.1s[i]).1m(z(){9(h.1k>0){h+=\'&\'}h+=i+\'[]=\'+5.1y(k,\'U\');o[i][o[i].1k]=5.1y(k,\'U\')})}}B{2Z:h,o:o}},4j:z(e){9(!e.50){B}B k.1m(z(){9(!k.2b||!5.2y.3F(e,k.2b.1r))5(e).2z(k.2b.1r);5(e).3U(k.2b.6)})},2h:z(o){9(o.1r&&5.Q&&5.j&&5.v){9(!5.u.D){5(\'12\',I).1I(\'<36 U="4y">&4u;</36>\');5.u.D=5(\'#4y\');5.u.D.H(0).K.N=\'15\'}k.4G({1r:o.1r,3f:o.3f?o.3f:g,3h:o.3h?o.3h:g,1H:o.1H?o.1H:g,2M:z(3n,M){5.u.D.41(3n);9(M>0){5(3n).4Q(M)}},21:o.21||o.48,22:o.22||o.4d,3q:C,1A:o.1A||o.25,M:o.M?o.M:g,18:o.18?C:g,1V:o.1V?o.1V:\'W\'});B k.1m(z(){6={1N:o.1N?C:g,4a:4b,13:o.13?3u(o.13):g,1S:o.1H?o.1H:g,M:o.M?o.M:g,1W:C,18:o.18?C:g,1E:o.1E?o.1E:P,L:o.L?o.L:P,1l:o.1l&&o.1l.1a==1T?o.1l:g,1d:o.1d&&o.1d.1a==1T?o.1d:g,X:/2G|2C/.4p(o.X)?o.X:g,1X:o.1X?E(o.1X)||0:g,V:o.V?o.V:g};5(\'.\'+o.1r,k).3U(6);k.5q=C;k.2b={1r:o.1r,1N:o.1N?C:g,4a:4b,13:o.13?3u(o.13):g,1S:o.1H?o.1H:g,M:o.M?o.M:g,1W:C,18:o.18?C:g,1E:o.1E?o.1E:P,L:o.L?o.L:P,3k:o.3k?C:g,6:6}})}}};5.3B.1x({5k:5.u.2h,49:5.u.4j});5.59=5.u.3b;',62,341,'|||||jQuery|dragCfg|dragged|elm|if|||||||false|||iDrag|this|||dropCfg|||iEL||||iSort|iDrop||||function|el|return|true|helper|parseInt|oC|css|get|document|var|style|containment|fx|display|dx|null|iUtil|dy|else|hb|id|cursorAt|pointer|axis|es|wb|oR|cont|body|opacity|highlighted|none|dhs|zones|ghosting|currentPointer|constructor|px|clonedEl|onStop|currentStyle|left|top|documentElement|position|overzone|length|onStart|each|ny|shs|Math|0px|accept|collected|zoney|zonex|for|nx|extend|attr|parentNode|onChange|ac|onDrag|in|handle|apply|grid|helperclass|append|scrollTop|getSize|els|cur|revert|block|pos|getPosition|browser|hpc|Function|hc|tolerance|so|snapDistance|si|newCoords|scrollLeft|onHover|onOut|window|inFrontOf|onchange|gx|onSlide|zonew|zoneh|oD|sortCfg|width|height|toInteger|dh|zIndex|build|cs|oP|changed|visibility|parentBorders|clientWidth|nRy|de|insideParent|gy|dragElem|ts|nRx|count|ser|marginRight|className|addClass|marginTop|fnc|horizontally|marginBottom|sl|event|vertically|st|margins|contBorders|removeClass|marginLeft|onDrop|clientHeight|prot|init|getBorder|checkhover|absolute|offsetLeft|diffX|diffY|parent|oldVisibility|oneIsSortable|hash|isDroppable|oldPosition|destroy|self|ih|borderLeftWidth|div|borderTopWidth|offsetTop|opera|iw|serialize|ActiveXObject|dragstop|dEs|activeclass|hidehelper|hoverclass|dragmove|getPointer|floats|dragstart|iSlider|drag|scrollHeight|hidden|sortable|autoSize|user|measure|parseFloat|fractions|isDraggable|scrollWidth|dhe|bind|applyOnHover|fn|offsetWidth|os|sliderSize|has|idsa|offsetHeight|restoreStyle|innerWidth|innerHeight|offsetParent|parentPos|sliderPos|oldBorder|right|bottom|msie|empty|clnt|Draggable|initialPosition|unbind|DraggableDestroy|while|min|max|after|pow|distance|size|dragHelper|cursor|move|onhover|SortableAddItem|zindex|3000|onselectstart|onout|ondragstart|String|Array|mousedown|draginit|addItem|highlight|checkdrop|shc|fit|intersect|test|remeasure|start|getPos|getMargins|nbsp|cloneNode|relative|auto|sortHelper|getContainment|check|getClient|filter|alpha|100|mousemove|Droppable|mouseup|new|custom|snapToGrid|abs|fitToContainer|sqrt|Object|break|fadeIn|listStyle|overflow|mozUserSelect|userSelect|find|before|typeof|number|ondrop|childNodes|sy|random|10000|tagName|toLowerCase|DroppableDestroy|getScroll|recallDroppables|SortSerialize|paddingTop|paddingRight|paddingBottom|paddingLeft|borderRightWidth|borderBottomWidth|pageX|clientX|pageY|clientY|Sortable|fromHandler|dragmoveBy|modifyContainer|hide|getPadding|isSortable|animate|html|lastSi|sx'.split('|'),0,{}))


/////////////////////////////////////////////////////////////////
/////  EDIT THE FOLLOWING VARIABLE VALUES  //////////////////////
/////////////////////////////////////////////////////////////////

// set the list selector
var setSelector = "#columns";
// set the cookie name
var setCookieName = "liviu";
// set the cookie expiry time (days):
var setCookieExpiry = 7;

/////////////////////////////////////////////////////////////////
/////  YOU PROBABLY WON'T NEED TO EDIT BELOW  ///////////////////
/////////////////////////////////////////////////////////////////

// function that writes the list order to a cookie
function getOrder() {
	// save custom order to cookie
	$.cookie(setCookieName, $(setSelector).sortable("toArray"), { expires: setCookieExpiry, path: "/" });
}

// function that restores the list order from a cookie
function restoreOrder() {
	var list = $(setSelector);
	if (list == null) return
	
	// fetch the cookie value (saved order)
	var cookie = $.cookie(setCookieName);
	if (!cookie) return;
	
	// make array from saved order
	var IDs = cookie.split(",");
	
	// fetch current order
	var items = list.sortable("toArray");
	
	// make array from current order
	var rebuild = new Array();
	for ( var v=0, len=items.length; v<len; v++ ){
		rebuild[items[v]] = items[v];
	}
	
	for (var i = 0, n = IDs.length; i < n; i++) {
		
		// item id from saved order
		var itemID = IDs[i];
		
		if (itemID in rebuild) {
		
			// select item id from current order
			var item = rebuild[itemID];
			
			// select the item according to current order
			var child = $("div.ui-sortable").children("#" + item);
			
			// select the item according to the saved order
			var savedOrd = $("div.ui-sortable").children("#" + itemID);
			
			// remove all the items
			child.remove();
			
			// add the items in turn according to saved order
			// we need to filter here since the "ui-sortable"
			// class is applied to all ul elements and we
			// only want the very first!  You can modify this
			// to support multiple lists - not tested!
			$("div.ui-sortable").filter(":first").append(savedOrd);
		}
	}
}

// code executed when the document loads
$(function() {
	//restoreOrder();
	// here, we allow the user to sort the items
	$(setSelector).sortable({
		axis: "y",
		cursor: "move",
		update: function() { getOrder(); }
	});
	
	// here, we reload the saved order
	restoreOrder();
});

/*
--- portlet

scriptul cofig.js se schimba complet
trebuie adaugate scripturile
<script src="http://www.shopdev.co.uk/blog/jquery-ui-1.5.1.packed.js" type="text/javascript"></script>
<script src="http://www.shopdev.co.uk/blog/jquery.cookie.js" type="text/javascript"></script>
table devine div si se sterg toate tr, td
la toate <div class="portlet"> se adauga div='item-i', unde i=1..n
*/

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

/*
 * SimpleModal 1.2.2 - jQuery Plugin
 * http://www.ericmmartin.com/projects/simplemodal/
 * Copyright (c) 2008 Eric Martin
 * Dual licensed under the MIT and GPL licenses
 * Revision: $Id: jquery.simplemodal.js 181 2008-12-16 16:51:44Z emartin24 $
 */
(function($){var ie6=$.browser.msie&&parseInt($.browser.version)==6&&!window['XMLHttpRequest'],ieQuirks=$.browser.msie&&!$.boxModel,w=[];$.modal=function(data,options){return $.modal.impl.init(data,options);};$.modal.close=function(){$.modal.impl.close();};$.fn.modal=function(options){return $.modal.impl.init(this,options);};$.modal.defaults={opacity:50,overlayId:'simplemodal-overlay',overlayCss:{},containerId:'simplemodal-container',containerCss:{},dataCss:{},zIndex:1000,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:'simplemodal-close',position:null,persist:false,onOpen:null,onShow:null,onClose:null};$.modal.impl={opts:null,dialog:{},init:function(data,options){if(this.dialog.data){return false;}this.opts=$.extend({},$.modal.defaults,options);this.zIndex=this.opts.zIndex;this.occb=false;if(typeof data=='object'){data=data instanceof jQuery?data:$(data);if(data.parent().parent().size()>0){this.dialog.parentNode=data.parent();if(!this.opts.persist){this.dialog.orig=data.clone(true);}}}else if(typeof data=='string'||typeof data=='number'){data=$('<div/>').html(data);}else{alert('SimpleModal Error: Unsupported data type: '+typeof data);return false;}this.dialog.data=data.addClass('simplemodal-data').css(this.opts.dataCss);data=null;this.create();this.open();if($.isFunction(this.opts.onShow)){this.opts.onShow.apply(this,[this.dialog]);}return this;},create:function(){w=this.getDimensions();if(ie6){this.dialog.iframe=$('<iframe src="javascript:false;"/>').css($.extend(this.opts.iframeCss,{display:'none',opacity:0,position:'fixed',height:w[0],width:w[1],zIndex:this.opts.zIndex,top:0,left:0})).appendTo('body');}this.dialog.overlay=$('<div/>').attr('id',this.opts.overlayId).addClass('simplemodal-overlay').css($.extend(this.opts.overlayCss,{display:'none',opacity:this.opts.opacity/100,height:w[0],width:w[1],position:'fixed',left:0,top:0,zIndex:this.opts.zIndex+1})).appendTo('body');this.dialog.container=$('<div/>').attr('id',this.opts.containerId).addClass('simplemodal-container').css($.extend(this.opts.containerCss,{display:'none',position:'fixed',zIndex:this.opts.zIndex+2})).append(this.opts.close?$(this.opts.closeHTML).addClass(this.opts.closeClass):'').appendTo('body');this.setPosition();if(ie6||ieQuirks){this.fixIE();}this.dialog.container.append(this.dialog.data.hide());},bindEvents:function(){var self=this;$('.'+this.opts.closeClass).bind('click.simplemodal',function(e){e.preventDefault();self.close();});$(window).bind('resize.simplemodal',function(){w=self.getDimensions();self.setPosition();if(ie6||ieQuirks){self.fixIE();}else{self.dialog.iframe&&self.dialog.iframe.css({height:w[0],width:w[1]});self.dialog.overlay.css({height:w[0],width:w[1]});}});},unbindEvents:function(){$('.'+this.opts.closeClass).unbind('click.simplemodal');$(window).unbind('resize.simplemodal');},fixIE:function(){var p=this.opts.position;$.each([this.dialog.iframe||null,this.dialog.overlay,this.dialog.container],function(i,el){if(el){var bch='document.body.clientHeight',bcw='document.body.clientWidth',bsh='document.body.scrollHeight',bsl='document.body.scrollLeft',bst='document.body.scrollTop',bsw='document.body.scrollWidth',ch='document.documentElement.clientHeight',cw='document.documentElement.clientWidth',sl='document.documentElement.scrollLeft',st='document.documentElement.scrollTop',s=el[0].style;s.position='absolute';if(i<2){s.removeExpression('height');s.removeExpression('width');s.setExpression('height',''+bsh+' > '+bch+' ? '+bsh+' : '+bch+' + "px"');s.setExpression('width',''+bsw+' > '+bcw+' ? '+bsw+' : '+bcw+' + "px"');}else{var te,le;if(p&&p.constructor==Array){if(p[0]){var top=typeof p[0]=='number'?p[0].toString():p[0].replace(/px/,'');te=top.indexOf('%')==-1?top+' + (t = '+st+' ? '+st+' : '+bst+') + "px"':parseInt(top.replace(/%/,''))+' * (('+ch+' || '+bch+') / 100) + (t = '+st+' ? '+st+' : '+bst+') + "px"';}if(p[1]){var left=typeof p[1]=='number'?p[1].toString():p[1].replace(/px/,'');le=left.indexOf('%')==-1?left+' + (t = '+sl+' ? '+sl+' : '+bsl+') + "px"':parseInt(left.replace(/%/,''))+' * (('+cw+' || '+bcw+') / 100) + (t = '+sl+' ? '+sl+' : '+bsl+') + "px"';}}else{te='('+ch+' || '+bch+') / 2 - (this.offsetHeight / 2) + (t = '+st+' ? '+st+' : '+bst+') + "px"';le='('+cw+' || '+bcw+') / 2 - (this.offsetWidth / 2) + (t = '+sl+' ? '+sl+' : '+bsl+') + "px"';}s.removeExpression('top');s.removeExpression('left');s.setExpression('top',te);s.setExpression('left',le);}}});},getDimensions:function(){var el=$(window);var h=$.browser.opera&&$.browser.version>'9.5'&&$.fn.jquery<='1.2.6'?document.documentElement['clientHeight']:el.height();return[h,el.width()];},setPosition:function(){var top,left,hCenter=(w[0]/2)-((this.dialog.container.height()||this.dialog.data.height())/2),vCenter=(w[1]/2)-((this.dialog.container.width()||this.dialog.data.width())/2);if(this.opts.position&&this.opts.position.constructor==Array){top=this.opts.position[0]||hCenter;left=this.opts.position[1]||vCenter;}else{top=hCenter;left=vCenter;}this.dialog.container.css({left:left,top:top});},open:function(){this.dialog.iframe&&this.dialog.iframe.show();if($.isFunction(this.opts.onOpen)){this.opts.onOpen.apply(this,[this.dialog]);}else{this.dialog.overlay.show();this.dialog.container.show();this.dialog.data.show();}this.bindEvents();},close:function(){if(!this.dialog.data){return false;}if($.isFunction(this.opts.onClose)&&!this.occb){this.occb=true;this.opts.onClose.apply(this,[this.dialog]);}else{if(this.dialog.parentNode){if(this.opts.persist){this.dialog.data.hide().appendTo(this.dialog.parentNode);}else{this.dialog.data.remove();this.dialog.orig.appendTo(this.dialog.parentNode);}}else{this.dialog.data.remove();}this.dialog.container.remove();this.dialog.overlay.remove();this.dialog.iframe&&this.dialog.iframe.remove();this.dialog={};}this.unbindEvents();}};})(jQuery);

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6(C){C.i={1x:{1w:6(E,F,H){7 G=C.i[E].1S;S(7 D 3Z H){G.1C[D]=G.1C[D]||[];G.1C[D].1t([F,H[D]])}},12:6(D,F,E){7 H=D.1C[F];5(!H){c}S(7 G=0;G<H.O;G++){5(D.8[H[G][0]]){H[G][1].1H(D.f,E)}}}},1B:{},e:6(D){5(C.i.1B[D]){c C.i.1B[D]}7 E=C(\'<2l 4E="i-4D">\').1R(D).e({Z:"1u",a:"-3k",b:"-3k",4G:"4Z"}).1z("U");C.i.1B[D]=!!((!(/1O|4S/).V(E.e("1k"))||(/^[1-9]/).V(E.e("p"))||(/^[1-9]/).V(E.e("o"))||!(/33/).V(E.e("4q"))||!(/3W|3V\\(0, 0, 0, 0\\)/).V(E.e("4h"))));4l{C("U").38(0).4o(E.38(0))}4f(F){}c C.i.1B[D]},4e:6(D){D.21="34";D.3i=6(){c n};5(D.1s){D.1s.3d="33"}},4c:6(D){D.21="4d";D.3i=6(){c w};5(D.1s){D.1s.3d=""}},4a:6(G,E){7 D=/a/.V(E||"a")?"Q":"R",F=n;5(G[D]>0){c w}G[D]=1;F=G[D]>0?w:n;G[D]=0;c F}};7 B=C.2x.1e;C.2x.1e=6(){C("*",4).1w(4).47("1e");c B.1H(4,30)};6 A(E,F,G){7 D=C[E][F].3I||[];D=(25 D=="2C"?D.2v(/,?\\s+/):D);c(C.48(G,D)!=-1)}C.1A=6(E,D){7 F=E.2v(".")[0];E=E.2v(".")[1];C.2x[E]=6(J){7 H=(25 J=="2C"),I=4g.1S.4m.12(30,1);5(H&&A(F,E,J)){7 G=C.17(4[0],E);c(G?G[J].1H(G,I):1U)}c 4.1y(6(){7 K=C.17(4,E);5(H&&K&&C.1W(K[J])){K[J].1H(K,I)}13{5(!H){C.17(4,E,4n C[F][E](4,J))}}})};C[F][E]=6(I,H){7 G=4;4.1h=E;4.2Z=F+"-"+E;4.8=C.2h({},C.1A.1Z,C[F][E].1Z,H);4.f=C(I).1r("1V."+E,6(L,J,K){c G.1V(J,K)}).1r("2w."+E,6(K,J){c G.2w(J)}).1r("1e",6(){c G.2s()});4.2O()};C[F][E].1S=C.2h({},C.1A.1S,D)};C.1A.1S={2O:6(){},2s:6(){4.f.2k(4.1h)},2w:6(D){c 4.8[D]},1V:6(D,E){4.8[D]=E;5(D=="1f"){4.f[E?"1R":"37"](4.2Z+"-1f")}},4i:6(){4.1V("1f",n)},4j:6(){4.1V("1f",w)}};C.1A.1Z={1f:n};C.i.2L={2V:6(){7 D=4;4.f.1r("46."+4.1h,6(E){c D.36(E)});5(C.1G.2M){4.3e=4.f.1X("21");4.f.1X("21","34")}4.3T=n},3l:6(){4.f.27("."+4.1h);(C.1G.2M&&4.f.1X("21",4.3e))},36:6(F){(4.1a&&4.1E(F));4.2b=F;7 E=4,G=(F.3P==1),D=(25 4.8.2e=="2C"?C(F.1P).3Q(4.8.2e):n);5(!G||D||!4.2q(F)){c w}4.24=!4.8.2c;5(!4.24){4.3U=3K(6(){E.24=w},4.8.2c)}5(4.2R(F)&&4.2p(F)){4.1a=(4.26(F)!==n);5(!4.1a){F.45();c w}}4.2I=6(H){c E.3a(H)};4.2K=6(H){c E.1E(H)};C(j).1r("3m."+4.1h,4.2I).1r("2X."+4.1h,4.2K);c n},3a:6(D){5(C.1G.2M&&!D.42){c 4.1E(D)}5(4.1a){4.1J(D);c n}5(4.2R(D)&&4.2p(D)){4.1a=(4.26(4.2b,D)!==n);(4.1a?4.1J(D):4.1E(D))}c!4.1a},1E:6(D){C(j).27("3m."+4.1h,4.2I).27("2X."+4.1h,4.2K);5(4.1a){4.1a=n;4.2Q(D)}c n},2R:6(D){c(18.2G(18.22(4.2b.1i-D.1i),18.22(4.2b.1d-D.1d))>=4.8.2r)},2p:6(D){c 4.24},26:6(D){},1J:6(D){},2Q:6(D){},2q:6(D){c w}};C.i.2L.1Z={2e:T,2r:1,2c:0}})(3J);(6(B){6 A(E,D){7 C=B.1G.4O&&B.1G.4K<4L;5(E.31&&!C){c E.31(D)}5(E.32){c!!(E.32(D)&16)}2y(D=D.1q){5(D==E){c w}}c n}B.1A("i.v",B.2h(B.i.2L,{2O:6(){7 C=4.8;4.W={};4.f.1R("i-v");4.3c();4.19=4.g.O?(/b|2z/).V(4.g[0].M.e("4U")):n;5(!(/(2W|1u|4V)/).V(4.f.e("Z"))){4.f.e("Z","2W")}4.d=4.f.d();4.2V()},1C:{},i:6(C){c{m:(C||4)["m"],u:(C||4)["u"]||B([]),Z:(C||4)["Z"],4J:(C||4)["1o"],8:4.8,f:4.f,M:(C||4)["k"],4I:C?C.f:T}},N:6(F,E,C,D){B.i.1x.12(4,F,[E,4.i(C)]);5(!D){4.f.4w(F=="2j"?F:"2j"+F,[E,4.i(C)],4.8[F])}},3F:6(E){7 C=(B.1W(4.8.g)?4.8.g.12(4.f):B(4.8.g,4.f)).2P(".i-v-m");7 D=[];E=E||{};C.1y(6(){7 F=(B(4).1X(E.4x||"35")||"").4y(E.3f||(/(.+)[-=4v](.+)/));5(F){D.1t((E.3h||F[1])+"[]="+(E.3h&&E.3f?F[1]:F[2]))}});c D.4s("&")},3E:6(C){7 D=(B.1W(4.8.g)?4.8.g.12(4.f):B(4.8.g,4.f)).2P(".i-v-m");7 E=[];D.1y(6(){E.1t(B(4).1X(C||"35"))});c E},3j:6(J){7 E=4.1o.b,D=E+4.t.o,I=4.1o.a,H=I+4.t.p;7 F=J.b,C=F+J.o,K=J.a,G=K+J.p;5(4.8.1Y=="39"||(4.8.1Y=="2n"&&4.t[4.19?"o":"p"]>J[4.19?"o":"p"])){c(I+4.d.r.a>K&&I+4.d.r.a<G&&E+4.d.r.b>F&&E+4.d.r.b<C)}13{c(F<E+(4.t.o/2)&&D-(4.t.o/2)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4.8.3b,4.g[F].M):4.g[F].M;5(!D){4.g[F].o=E.1L();4.g[F].p=E.1N()}7 G=E.d();4.g[F].b=G.b;4.g[F].a=G.a}S(7 F=4.h.O-1;F>=0;F--){7 G=4.h[F].f.d();4.h[F].W.b=G.b;4.h[F].W.a=G.a;4.h[F].W.o=4.h[F].f.1L();4.h[F].W.p=4.h[F].f.1N()}},2s:6(){4.f.37("i-v i-v-1f").2k("v").27(".v");4.3l();S(7 C=4.g.O-1;C>=0;C--){4.g[C].M.2k("v-M")}},2u:6(E){7 C=E||4,F=C.8;5(F.u.4t==4r){7 D=F.u;F.u={f:6(){c B("<2l></2l>").1R(D)[0]},1D:6(G,H){H.e(G.d()).e({o:G.1L(),p:G.1N()})}}}C.u=B(F.u.f.12(C.f,C.k)).1z("U").e({Z:"1u"});F.u.1D.12(C.f,C.k,C.u)},3x:6(F){S(7 D=4.h.O-1;D>=0;D--){5(4.3j(4.h[D].W)){5(!4.h[D].W.1j){5(4.1Q!=4.h[D]){7 I=4M;7 H=T;7 E=4.1o[4.h[D].19?"b":"a"];S(7 C=4.g.O-1;C>=0;C--){5(!A(4.h[D].f[0],4.g[C].M[0])){2a}7 G=4.g[C][4.h[D].19?"b":"a"];5(18.22(G-E)<I){I=18.22(G-E);H=4.g[C]}}5(!H&&!4.8.3A){2a}5(4.u){4.u.1e()}5(4.h[D].8.u){4.h[D].2u(4)}13{4.u=T}4.1Q=4.h[D];H?4.28(F,H,T,w):4.28(F,T,4.h[D].f,w);4.N("2T",F);4.h[D].N("2T",F,4)}4.h[D].N("1j",F,4);4.h[D].W.1j=1}}13{5(4.h[D].W.1j){4.h[D].N("3z",F,4);4.h[D].W.1j=0}}}},2q:6(G,F){5(4.8.1f||4.8.3w=="3Y"){c n}4.2B();7 E=T,D=4,C=B(G.1P).3r().1y(6(){5(B.17(4,"v-M")==D){E=B(4);c n}});5(B.17(G.1P,"v-M")==D){E=B(G.1P)}5(!E){c n}5(4.8.2Y&&!F){7 H=n;B(4.8.2Y,E).3X("*").3R().1y(6(){5(4==G.1P){H=w}});5(!H){c n}}4.k=E;c w},26:6(H,F,C){7 J=4.8;4.1Q=4;4.29();4.m=25 J.m=="6"?B(J.m.1H(4.f[0],[H,4.k])):4.k.2o();5(!4.m.3r("U").O){4.m.1z((J.1z!="q"?J.1z:4.k[0].1q))}4.m.e({Z:"1u",2i:"4b"}).1R("i-v-m");4.11={b:(P(4.k.e("49"),10)||0),a:(P(4.k.e("4k"),10)||0)};4.d=4.k.d();4.d={a:4.d.a-4.11.a,b:4.d.b-4.11.b};4.d.r={b:H.1i-4.d.b,a:H.1d-4.d.a};4.z=4.m.z();7 D=4.z.d();4.1K={a:(P(4.z.e("2m"),10)||0),b:(P(4.z.e("2D"),10)||0)};4.d.q={a:D.a+4.1K.a,b:D.b+4.1K.b};4.1p=4.2H(H);4.2J={1F:4.k.1F()[0],q:4.k.q()[0]};4.t={o:4.m.1L(),p:4.m.1N()};5(J.u){4.2u()}4.N("1M",H);4.t={o:4.m.1L(),p:4.m.1N()};5(J.1b){5(J.1b.b!=1U){4.d.r.b=J.1b.b}5(J.1b.2z!=1U){4.d.r.b=4.t.o-J.1b.2z}5(J.1b.a!=1U){4.d.r.a=J.1b.a}5(J.1b.3L!=1U){4.d.r.a=4.t.p-J.1b.3L}}5(J.l){5(J.l=="q"){J.l=4.m[0].1q}5(J.l=="j"||J.l=="1n"){4.l=[0-4.d.q.b,0-4.d.q.a,B(J.l=="j"?j:1n).o()-4.d.q.b-4.t.o-4.11.b-(P(4.f.e("3M"),10)||0),(B(J.l=="j"?j:1n).p()||j.U.1q.3O)-4.d.q.a-4.t.p-4.11.a-(P(4.f.e("3N"),10)||0)]}5(!(/^(j|1n|q)$/).V(J.l)){7 G=B(J.l)[0];7 I=B(J.l).d();4.l=[I.b+(P(B(G).e("2D"),10)||0)-4.d.q.b,I.a+(P(B(G).e("2m"),10)||0)-4.d.q.a,I.b+18.2G(G.44,G.3D)-(P(B(G).e("2D"),10)||0)-4.d.q.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.f[0],4.g[C].M[0]):w)){4.3s=E==1?"3o":"4A";4.28(D,4.g[C]);4.N("2T",D);4z}}4.3x(D);4.N("2j",D);5(!4.8.23||4.8.23=="x"){4.m[0].1s.b=4.Z.b+"3t"}5(!4.8.23||4.8.23=="y"){4.m[0].1s.a=4.Z.a+"3t"}5(B.i.1g){B.i.1g.4u(4,D)}c n},28:6(H,G,D,F){D?D.4T(4.k):G.M[4.3s=="3o"?"4X":"4R"](4.k);4.1I=4.1I?++4.1I:1;7 E=4,C=4.1I;1n.3K(6(){5(C==E.1I){E.29(!F)}},0);5(4.8.u){4.8.u.1D.12(4.f,4.k,4.u)}},2Q:6(E,D){5(B.i.1g&&!4.8.3p){B.i.1g.4N(4,E)}5(4.8.2U){7 C=4;7 F=C.k.d();5(C.u){C.u.3q({1m:"4Q"},(P(4.8.2U,10)||3y)-50)}B(4.m).3q({b:F.b-4.d.q.b-C.11.b+(4.z[0]==j.U?0:4.z[0].R),a:F.a-4.d.q.a-C.11.a+(4.z[0]==j.U?0:4.z[0].Q)},P(4.8.2U,10)||3y,6(){C.2i(E)})}13{4.2i(E,D)}c n},2i:6(E,D){5(4.2J.1F!=4.k.1F().2P(".i-v-m")[0]||4.2J.q!=4.k.q()[0]){4.N("1D",E,T,D)}5(!A(4.f[0],4.k[0])){4.N("1e",E,T,D);S(7 C=4.h.O-1;C>=0;C--){5(A(4.h[C].f[0],4.k[0])){4.h[C].N("1D",E,4,D);4.h[C].N("4p",E,4,D)}}}S(7 C=4.h.O-1;C>=0;C--){4.h[C].N("40",E,4,D);5(4.h[C].W.1j){4.h[C].N("3z",E,4);4.h[C].W.1j=0}}4.3G=n;5(4.41){4.N("1T",E,T,D);c n}B(4.k).e("3H","");5(4.u){4.u.1e()}4.m.1e();4.m=T;4.N("1T",E,T,D);c w}}));B.2h(B.i.v,{3I:"3F 3E",1Z:{m:"2o",1Y:"2n",2r:1,2c:0,1v:w,14:20,15:20,2e:":3S",g:"> *",1l:43,3A:w,1z:"q"}});B.i.1x.1w("v","1k",{1M:6(E,D){7 C=B("U");5(C.e("1k")){D.8.2t=C.e("1k")}C.e("1k",D.8.1k)},1T:6(D,C){5(C.8.2t){B("U").e("1k",C.8.2t)}}});B.i.1x.1w("v","1l",{1M:6(E,D){7 C=D.m;5(C.e("1l")){D.8.2E=C.e("1l")}C.e("1l",D.8.1l)},1T:6(D,C){5(C.8.2E){B(C.m).e("1l",C.8.2E)}}});B.i.1x.1w("v","1m",{1M:6(E,D){7 C=D.m;5(C.e("1m")){D.8.2A=C.e("1m")}C.e("1m",D.8.1m)},1T:6(D,C){5(C.8.2A){B(C.m).e("1m",C.8.2A)}}});B.i.1x.1w("v","1v",{1M:6(E,D){7 F=D.8;7 C=B(4).17("v");C.X=6(G){3B{5(/1O|1v/.V(G.e("2f"))||(/1O|1v/).V(G.e("2f-y"))){c G}G=G.q()}2y(G[0].1q);c B(j)}(C.k);C.Y=6(G){3B{5(/1O|1v/.V(G.e("2f"))||(/1O|1v/).V(G.e("2f-x"))){c G}G=G.q()}2y(G[0].1q);c B(j)}(C.k);5(C.X[0]!=j&&C.X[0].2d!="2g"){C.2F=C.X.d()}5(C.Y[0]!=j&&C.Y[0].2d!="2g"){C.2N=C.Y.d()}},2j:6(E,D){7 F=D.8;7 C=B(4).17("v");5(C.X[0]!=j&&C.X[0].2d!="2g"){5((C.2F.a+C.X[0].3C)-E.1d<F.14){C.X[0].Q=C.X[0].Q+F.15}5(E.1d-C.2F.a<F.14){C.X[0].Q=C.X[0].Q-F.15}}13{5(E.1d-B(j).Q()<F.14){B(j).Q(B(j).Q()-F.15)}5(B(1n).p()-(E.1d-B(j).Q())<F.14){B(j).Q(B(j).Q()+F.15)}}5(C.Y[0]!=j&&C.Y[0].2d!="2g"){5((C.2N.b+C.Y[0].3D)-E.1i<F.14){C.Y[0].R=C.Y[0].R+F.15}5(E.1i-C.2N.b<F.14){C.Y[0].R=C.Y[0].R-F.15}}13{5(E.1i-B(j).R()<F.14){B(j).R(B(j).R()-F.15)}5(B(1n).o()-(E.1i-B(j).R())<F.14){B(j).R(B(j).R()+F.15)}}}})})(3J);',62,311,'||||this|if|function|var|options||top|left|return|offset|css|element|items|containers|ui|document|currentItem|containment|helper|false|width|height|parent|click||helperProportions|placeholder|sortable|true|||offsetParent|||||||||||||item|propagate|length|parseInt|scrollTop|scrollLeft|for|null|body|test|containerCache|overflowY|overflowX|position||margins|call|else|scrollSensitivity|scrollSpeed||data|Math|floating|_mouseStarted|cursorAt|grid|pageY|remove|disabled|ddmanager|widgetName|pageX|over|cursor|zIndex|opacity|window|positionAbs|originalPosition|parentNode|bind|style|push|absolute|scroll|add|plugin|each|appendTo|widget|cssCache|plugins|update|mouseUp|prev|browser|apply|counter|mouseDrag|offsetParentBorders|outerWidth|start|outerHeight|auto|target|currentContainer|addClass|prototype|stop|undefined|setData|isFunction|attr|tolerance|defaults||unselectable|abs|axis|_mouseDelayMet|typeof|mouseStart|unbind|rearrange|refreshPositions|continue|_mouseDownEvent|delay|tagName|cancel|overflow|HTML|extend|clear|sort|removeData|div|borderTopWidth|guess|clone|mouseDelayMet|mouseCapture|distance|destroy|_cursor|createPlaceholder|split|getData|fn|while|right|_opacity|refreshItems|string|borderLeftWidth|_zIndex|overflowYOffset|max|generatePosition|_mouseMoveDelegate|domPosition|_mouseUpDelegate|mouse|msie|overflowXOffset|init|not|mouseStop|mouseDistanceMet|connectWith|change|revert|mouseInit|relative|mouseup|handle|widgetBaseClass|arguments|contains|compareDocumentPosition|none|on|id|mouseDown|removeClass|get|pointer|mouseMove|toleranceElement|refresh|MozUserSelect|_mouseUnselectable|expression|instance|key|onselectstart|intersectsWith|5000px|mouseDestroy|mousemove|round|down|dropBehaviour|animate|parents|direction|px|convertPositionTo|intersectsWithEdge|type|contactContainers|500|out|dropOnEmpty|do|offsetHeight|offsetWidth|toArray|serialize|dragging|visibility|getter|jQuery|setTimeout|bottom|marginRight|marginBottom|scrollHeight|which|is|andSelf|input|started|_mouseDelayTimer|rgba|transparent|find|static|in|deactivate|cancelHelperRemoval|button|1000|scrollWidth|preventDefault|mousedown|trigger|inArray|marginLeft|hasScroll|both|enableSelection|off|disableSelection|catch|Array|backgroundColor|enable|disable|marginTop|try|slice|new|removeChild|receive|backgroundImage|String|join|constructor|drag|_|triggerHandler|attribute|match|break|up|next|prepareOffsets|gen|class|semi|display|dynamic|sender|absolutePosition|version|522|10000|drop|safari|hidden|hide|after|default|append|float|fixed|activate|before|current|block|'.split('|'),0,{}))









