        
		 
		var DRAGOSIEN_GET_ELEMENT_BY_ID_CACHE = new Array();
		function elm(uid) {
			if (!DRAGOSIEN_GET_ELEMENT_BY_ID_CACHE[uid]) {
				DRAGOSIEN_GET_ELEMENT_BY_ID_CACHE[uid] = document.getElementById(uid);
			}
			return DRAGOSIEN_GET_ELEMENT_BY_ID_CACHE[uid];
		} 
		
		function showBuildingTooltip(obj) {
			obj.parentNode.style.width='180px';
			obj.style.display='block'
		}
		
		function hideBuildingTooltip(obj) {
			obj.parentNode.style.width='100px';
			obj.style.display='none';
		}
		
        function doSell(uname) {
            location.href=_TPL_SELF+'&action=sell&product='+ uname +'&count='+ elm('cs_'+uname).value;
        }
        function doBuy(uname) {
            location.href=_TPL_SELF+'&action=buy&product='+ uname +'&count='+ elm('c_'+uname).value;
        }
        function doOffer(uname, min, max, gid) {
            price = elm('go_'+uname).value;
            if (price>=min && price <= max) {
                location.href=_TPL_SELF+'&action=offer&gid='+ gid +'&product='+ uname +'&count='+ elm('co_'+uname).value+'&price='+ price;
            } else {
                alert('Bitte einen Angebotspreis zwischen '+ min +' und '+ max +' Gold eingeben!');
            }
        }
        function doDemand(uname, min, max, gid) {
            price = elm('gd_'+uname).value;
            if (price>=min && price<=max) {
                location.href=_TPL_SELF+'&action=demand&gid='+ gid +'&product='+ uname +'&count='+ elm('cd_'+uname).value+'&price='+ price;
            } else {
                alert('Bitte einen Nachfragepreis zwischen '+ min +' und '+ max +' Gold eingeben!');
            }
        }
        function doMarketBuy(mid, product, gid) {
            location.href=_TPL_SELF+'&action=marketbuy&gid='+ gid +'&offer='+ mid +'&count='+ elm('m_'+mid).value+'&product='+ product;
        }
        function getbackMarket(mid, product, gid) {
            location.href=_TPL_SELF+'&action=getback_market&gid='+ gid +'&offer='+ mid +'&product='+ product;
        }
        function doDemandSell(mid, product, gid) {
            location.href=_TPL_SELF+'&action=marketdemandsell&gid='+ gid +'&offer='+ mid +'&count='+ elm('md_'+mid).value+'&product='+ product;
        }
        function getbackDemand(mid, product, gid) {
            location.href=_TPL_SELF+'&action=getback_demand&gid='+ gid +'&offer='+ mid +'&product='+ product;
        }
      
        function eventCalculatePrice(eid, price) {
            if (1*elm(eid).value>1*elm('c'+eid).innerHTML) {
               elm(eid).value = elm('c'+eid).innerHTML;
               elm(eid).blur();
            }
            elm('b'+eid).innerHTML=(elm(eid).value*price);
            setTimeout('eventCalculatePrice("'+ eid +'", "'+ price +'")', 500);
        }
        function transferMaterial(pos, uname) {
            location.href=_TPL_SELF+'&action=transfer_material&product='+ uname +'&position='+ pos +'&count='+ elm('m_count'+uname).value;
        }
        function getbackMaterial(pos, uname) {
            location.href=_TPL_SELF+'&action=getback_material&product='+ uname +'&position='+ pos;
        }
        function transferFood(uname) {
            location.href=_TPL_SELF+'&action=transfer_food&product='+ uname +'&count='+ elm('m_countfood_'+uname).value;
        }

        function transferDragonMaterial(did, uname, nr) {
            location.href=_TPL_SELF+'&action=transfer_dragon_material&product='+ uname +'&nr='+ nr +'&did1='+ did +'&count='+ elm('m_count'+nr).value;
        }
        function getbackDragonMaterial(did, uname) {
            location.href=_TPL_SELF+'&action=getback_dragon_material&product='+ uname +'&did1='+ did;
        }
        function increaseDragonDelta(did, uname) {
            location.href=_TPL_SELF+'&action=increase_dragon_delta&product='+ uname +'&did1='+ did;
        }
        function decreaseDragonDelta(did, uname) {
            location.href=_TPL_SELF+'&action=decrease_dragon_delta&product='+ uname +'&did1='+ did;
        }
    
        function goToTPL(para) {
            location.href = _TPL_SELF + para; 
        }
        function goTo(para) {
            location.href = _BASE_HREF+'?' + para; 
        }
        function goToVillage(para) {
	        if(!para) para = '';
            location.href = _BASE_HREF+'?t=village&' + para; 
        }


		function addListener( obj, type, fn )
		{
		 	if (obj.addEventListener) {
		 		if (type=='mousewheel') {
		 			type = 'DOMMouseScroll';
		 		}
		 		obj.addEventListener( type, fn, false );
		 	} else if (obj.attachEvent) {
		 		obj["e"+type+fn] = fn;
		 		obj[type+fn] = function() {
		 			obj["e"+type+fn]( window.event );
		 		};
		 		obj.attachEvent('on'+type, obj[type+fn] );
		 	}
		}

		function ajaxRequest(aUrl, aFunction) {
			var xmlHttp = null;
		 	// Mozilla, Opera, Safari, IE7
			if (typeof(XMLHttpRequest) != 'undefined') {
		 	//alert(typeof(XMLHttpRequest));
				xmlHttp = new XMLHttpRequest();
		 	}
		 	if (!xmlHttp) {
		 		// IE < 7
		 		try {
		 			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		 		} catch(e) {
		 			try {
		 				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		 			} catch(e) {
		 				xmlHttp = null;
		 			}
		 		}
		 	}
		 	if (xmlHttp) {
				//xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
				//alert(aUrl);
				
		 		xmlHttp.open('GET', aUrl, true);
				//xmlHttp.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		 		xmlHttp.onreadystatechange = function () {
		 			if (xmlHttp.readyState == 4) {
		 				var tmp = new aFunction(xmlHttp.responseText);
		 			}
		 		};
		 		xmlHttp.send(null);
		 	}
		}
		
		function profileShowSite(nr) {
			elm('profil_1').style.display='none';
			elm('profil_2').style.display='none';
			elm('profil_3').style.display='none';
			
			elm('profil_'+ nr).style.display='block';
			elm('show_site').value=nr;
		}
function hasClassName(obj, needle) {
    if (obj.className && needle) {
        var haystack = obj.className;
        return haystack == needle ||
            haystack.indexOf(" " + needle + " ") >= 0 ||
            haystack.indexOf(needle + " ") == 0 ||
            haystack.indexOf(" " + needle) > 0 &&
            haystack.indexOf(" " + needle) == haystack.length - (" " + needle).length;
    } else {
        return false;
    }
}
function getChildNodeWithClassName(obj, className) {
    if (obj.childNodes) {
        for (i in obj.childNodes) {
            if (hasClassName(obj.childNodes[i], className)) {
                return obj.childNodes[i];
            } else if (obj.childNodes[i].firstChild) {
                var node = getChildNodeWithClassName(obj.childNodes[i], className);
                if (node) {
                    return node;
                }
            }
        }
    }
    return false;
}
function Tooltip() {
	
	var thisObj = this;
	var dragosienTooltip = document.getElementById('dragosienTooltip');

    var body = null;
    if ( window.document.compatMode && window.document.compatMode == "CSS1Compat" )
    {
        body = window.document.documentElement;
    } else if (window.document.body) {
            body = window.document.body;
    };
	
	
	this.show = function(event) {
		if (!event) var event = window.event;
		var x = (event.pageX) ? event.pageX : event.clientX + body.scrollLeft;
    	var y = (event.pageY) ? event.pageY : event.clientY + body.scrollTop;
    	dragosienTooltip.innerHTML =  this.attributes['title'].nodeValue;
    	this.attributes['title'].nodeValue = '';
		dragosienTooltip.style.left = x+'px'; 
		dragosienTooltip.style.top = y+'px'; 
		dragosienTooltip.style.display = 'block';
		
	}
	this.hide = function() {
		dragosienTooltip.style.display = 'none'; 
    	this.attributes['title'].nodeValue = dragosienTooltip.innerHTML;
	}
	
	this.showHTML = function(event) {
		if (!event) var event = window.event;
		var x = (event.pageX) ? event.pageX : event.clientX + body.scrollLeft;
    	var y = (event.pageY) ? event.pageY : event.clientY + body.scrollTop;
    	search = this;
		while (search.nextSibling) {
			if (search.nextSibling.className=='hidden') {
				break;
			} else {
				search = search.nextSibling;
			}
		}
	    dragosienTooltip.innerHTML =  search.nextSibling.innerHTML;
		
		dragosienTooltip.style.left = x+'px'; 
		dragosienTooltip.style.top = y+'px'; 
		dragosienTooltip.style.display = 'block';
	}
	this.hideHTML = function() {
		dragosienTooltip.style.display = 'none'; 
	}
}

function mapTooltip(obj, text) {
	var mapTooltip = document.getElementById('mapTooltip');
	
	var thisObj = this;
	
	this.show = function(event) {
		if (!event) var event = window.event;
		var x = (event.pageX) ? event.pageX : event.clientX + body.scrollLeft;
    	var y = (event.pageY) ? event.pageY : event.clientY + body.scrollTop;
		//this.innerHTML =  '<div class="tooltip tooltipMap" style="display:block;position:relative;">' + this.attributes['tooltip'].nodeValue + '</div>';
    	//this.attributes['tooltip'].nodeValue = '';
		/*
		mapTooltip.style.left = x+'px'; 
		mapTooltip.style.top = y+'px'; 
		*/
		//mapTooltip.style.display = 'block';
		thisObj.obj = this;
		this.style.width='200px';
		this.style.height='200px';
		this.style.backgroundColor='#f00';
		this.style.zIndex=200;
	}
	this.hide = function() {
		//console.log('hide');
		//thisObj.obj.innerHTML = '';
		//window.setTimeout('mapTooltip.doHide()', 1000);
		//mapTooltip.style.display = 'none'; 
    	//this.attributes['tooltip'].nodeValue = mapTooltip.innerHTML;
	}
	
	this.doHide = function() {
		 
		thisObj.obj.innerHTML = '';
	}

	//alert(obj.event);
	//alert(text);
}
    


function Countdown(obj) {
	var thisObj = this;
	thisObj.htmlObj = obj;
	thisObj.startValue = parseInt(obj.title)*1000;
	obj.attributes['title'].nodeValue = '';
	var localTime=new Date();
	thisObj.startTime=localTime.getTime();
		
	thisObj.maxDigits = 2;
	thisObj.delimiter = ' ';
	
	this.updateTime = function() {
		var localTime=new Date();
		var deltaTime = (localTime.getTime() - thisObj.startValue);
		thisObj.htmlObj.innerHTML = thisObj.formatTime(parseInt( (thisObj.startTime - deltaTime)/1000));
	}
	
	this.formatTime=function(timestamp){
		maxDigits=thisObj.maxDigits;

		var timeunits=new Array;
		timeunits.day=86400;
		timeunits.hour=3600;
		timeunits.minute=60;
		timeunits.second=1;
		
		var loca=new Array;
		loca.day="T";
		loca.hour="h";
		loca.minute="m";
		loca.second="s";
		
		loca.done = 'fertig';
		var timestring="";
		if(timestamp<=0) {
			timestring = loca.done;
		} else {
			for(var k in timeunits){
				var nv=Math.floor(timestamp/timeunits[k]);
				if(maxDigits>0&&(nv>0||thisObj.zerofill&&timestring!="")){
					//window.status = k + '#'+window.status;
					timestamp=timestamp-nv*timeunits[k];
						if(timestring!="") {
							timestring+=thisObj.delimiter;
							if(nv<10&&nv>0&&thisObj.zerofill){
								nv="0"+nv;
							}
							if(nv==0){
								nv="00";
							}
					}
					timestring+=nv+loca[k];
					maxDigits--;
				}
			}
			if (timestamp) { // keine sekunden anzeige
				setTimeout(thisObj.updateTime, 10000);
			} else {
				setTimeout(thisObj.updateTime, 200);
			}
		}
		return timestring;
	}
	thisObj.updateTime();
}


function Slider(slideObj, startX, slideRangeMax) {
    if (!slideObj || !(typeof slideObj == "object")) {
        window.status = 'SlideObjekt nicht gefunden';
		return false;
    }
	
    var thisObj = this;
	thisObj.slideContentObj = slideObj;
	thisObj.slideHandleObj = getChildNodeWithClassName(slideObj, 'slideHandle');
	
	
	this.slideHandle = function(ev) {
		addListener(document, "onclick", function (ev) {
			if (thisObj.action == "slideHandle") {
				thisObj.startDragX = parseInt(thisObj.slideHandleObj.style.left) ? parseInt(thisObj.slideHandleObj.style.left) : 0;
			}
			thisObj.action = "";
		});
		thisObj.action = "slideHandle";
		thisObj.startPosX = document.all ? window.event.clientX : ev.pageX;
		thisObj.startDragX = thisObj.slideX;
		document.onmousemove = function (ev) {
			posX = document.all ? window.event.clientX : ev.pageX;
			if (typeof event != "undefined") {
				if (event.preventDefault) {
					event.preventDefault();
				}
				event.returnValue = false;
			}
			thisObj.slideTo(posX);
			thisObj.onSlide(thisObj.getRangeValue());
			//window.status = thisObj.action;
		};
	} 
	this.getRangeValue = function() {
		//window.status += '#gr:'+ thisObj.slideX +'#'+ thisObj.boxWidth  +'#'+  thisObj.slideRangeMax
		return thisObj.slideX/thisObj.boxWidth * thisObj.slideRangeMax;
	}
	this.slideTo = function(posX) {
		    currX = posX - thisObj.startPosX + thisObj.startDragX;// -  thisObj.startPosX;//thisObj.startDragX + (posX - thisObj.startPosX);
		    testX = posX - thisObj.startPosX + thisObj.startDragX + thisObj.boxWidth;//thisObj.boxWidth - (parseInt(thisObj.slideHandleObj.offsetWidth));
		    if (currX > thisObj.boxWidth) {
		        //currX = thisObj.boxWidth;
		        thisObj.slideX = thisObj.boxWidth;
		    } else {
		        thisObj.slideX = Math.max(0, currX);
		    }
		    thisObj.slideHandleObj.style.marginLeft = thisObj.slideX + "px";
	}
	
	this.onChange = function (val) {// ableiten bitte
	}
	this.onSlide = function (val) {// ableiten bitte
	}
	
	this.slideEnd = function(ev) {
		document.onmousemove = "";
		if (thisObj.action == "slideHandle") {
			//thisObj.startDragX = parseInt(thisObj.slideHandleObj.style.left) ? parseInt(thisObj.slideHandleObj.style.left) : 0;
			thisObj.onChange(thisObj.getRangeValue());
		}
		thisObj.action = "";
	}
	
    addListener(thisObj.slideHandleObj, "mousedown", thisObj.slideHandle);
    addListener(thisObj.slideHandleObj, "mouseup", thisObj.slideEnd);
    thisObj.slideHandleObj.parentNode.parentNode.onmouseup = thisObj.slideEnd;
    
    //addListener(thisObj.slideHandleObj.parentNode.parentNode, "mouseup", thisObj.slideEnd);
	
	
	//thisObj.slideHandleObj.style.position = 'absolute';
	thisObj.boxWidth = thisObj.slideContentObj.offsetWidth;
	thisObj.startPosX = 0;
	thisObj.startDragX = 0;
	thisObj.slideRangeMax = slideRangeMax;
	thisObj.slideTo(startX);
	//thisObj.boxLeft = 
	
}

function Ticker(htmlObj) {
	if (typeof htmlObj != "undefined") {
    	
    	var thisObj = this;
    	thisObj.htmlObj = htmlObj;
		thisObj.htmlText = thisObj.htmlObj.innerHTML;
		thisObj.htmlObj.innerHTML = '';
		
		if (thisObj.htmlText.indexOf('tickerEnde')>0) {
			thisObj.length = thisObj.htmlText.indexOf('tickerEnde');
		} else  {
			thisObj.length = thisObj.htmlText.length;
		}
		
		thisObj.pos = 0;    
		thisObj.lastPos = 0;	
    	
    	this.showNextLine = function() {
    		thisObj.nextPos = thisObj.htmlText.toUpperCase().indexOf("<BR", thisObj.nextPos)+3;
    		//alert(thisObj.htmlText);
    		var testPos = thisObj.htmlText.toUpperCase().indexOf("<BR", thisObj.nextPos);
    		if (testPos < thisObj.nextPos+5 && testPos > 0) {
    			thisObj.nextPos = thisObj.htmlText.toUpperCase().indexOf("<BR", thisObj.nextPos)+3;
    		}
    		
    		if (thisObj.nextPos > thisObj.lastPos) {
	    		thisObj.lastPos = thisObj.nextPos;
	    		thisObj.showNextChar();
	    	}
    	}
    	
    	this.showNextChar = function() {
    		
    		thisObj.pos = thisObj.nextPos;
    		thisObj.htmlObj.innerHTML = thisObj.htmlText.substr(0, thisObj.pos);
    		
			if (thisObj.length>thisObj.pos+10) {
	    		thisObj.htmlObj.innerHTML += '<br /><a href="#" onclick="ticker.showNextLine();return false;" class="inline">weiter</a>';	
	    	} else {
	    		thisObj.htmlObj.innerHTML = thisObj.htmlText;
	    	}
    	}
    	
    	
    	thisObj.showNextLine();
	
	}	
}

function jQSlider(elmInput) {
	
	var thisObj = this;
	
	thisObj.elmInput = elmInput;
	thisObj.startValue = thisObj.elmInput.value;
	thisObj.maxValue = thisObj.elmInput.value;
	thisObj.value = thisObj.elmInput.value;
	thisObj.minValue = 0;
	thisObj.clickToActivate = true;
	
	var tooltip = new Tooltip();
	
	
	/*
	if (hasClassName(elmInput, 'click')) {
		thisObj.clickToActivate = true;
	} else {
		thisObj.clickToActivate = true;
	}
	*/
	
	
	// max
	var str   = thisObj.elmInput.className;
	var first = str.indexOf('max_') + 4;
	if (first >= 4) {
		var next  = str.indexOf(' ', first);
		if (next<0) {
			next = str.length;
		}
		thisObj.maxValue = parseInt(str.substr(first, next-first));
	}
	// min	
	var first = str.indexOf('min_') + 4;
	if (first >= 4) {
		var next  = str.indexOf(' ', first);
		if (next<0) {
			next = str.length;
		}
		thisObj.minValue = parseInt(str.substr(first, next-first));
	}
	// val	
	var first = str.indexOf('val_') + 4;
	if (first >= 4) {
		var next  = str.indexOf(' ', first);
		if (next<0) {
			next = str.length;
		}
		thisObj.value  = thisObj.startValue = parseInt(str.substr(first, next-first));
	}

	// special (z.B. Gebauede fuer 24h fuellen)	
	var first = str.indexOf('special_') + 8;
	thisObj.specialValue = 0;
	if (first >= 8) {
		var next  = str.indexOf(' ', first);
		if (next<0) {
			next = str.length;
		}
		thisObj.specialValue = parseInt(str.substr(first, next-first));
	}

	$(thisObj.elmInput.parentNode).append('<div></div>');

	thisObj.container = $('<div></div>');
	thisObj.container.addClass('slider');
	thisObj.container.addClass('sliderInput');
	$(thisObj.elmInput.parentNode).append(thisObj.container);
	thisObj.container.hide();
	
	if (!thisObj.clickToActivate) {
		$(thisObj.elmInput).mouseover( function() {
			thisObj.container.show();
			$(thisObj.elmInput).addClass('active');
			
			thisObj.elmInput.flagOver = true;
		});
		$(thisObj.elmInput).mouseout( function() {
			thisObj.elmInput.flagOver = false;
			thisObj.containerClose();
		});
	}

	$(thisObj.elmInput).focus( function() {
		thisObj.container.show();
		$(thisObj.elmInput).addClass('active');
		thisObj.elmInput.flagFocus = true;
		if ($('body')[0].activeSlider && $('body')[0].activeSlider.elmInput.id != thisObj.elmInput.id) {
			$('body')[0].activeSlider.containerCloseNow();
		}
		$('body')[0].activeSlider = thisObj;
	});
	$(thisObj.elmInput).blur( function() {
		thisObj.elmInput.flagFocus = false;
		thisObj.containerClose();
	});
	$(thisObj.elmInput).keyup( function() {
		thisObj.slideArea.slider('value', thisObj.testValue(thisObj.elmInput.value));
	});
	$(thisObj.container).mouseover( function() {
		thisObj.container.flagOver = true;
	});		
	$(thisObj.container).mouseout( function() {
		thisObj.container.flagOver = false;
		thisObj.containerClose();
	});
	$('body').click( function(e) {
		if (e.target.parentNode != thisObj.elmInput.parentNode && e.target.parentNode.parentNode != thisObj.elmInput.parentNode) {
			thisObj.elmInput.flagFocus = false;
			thisObj.containerCloseNow();
		}
	});
	
	thisObj.minus10 = $('<a></a>');
	thisObj.minus10.addClass('minus10');
	thisObj.container.append(thisObj.minus10);
	thisObj.minus10.click(function() {
		thisObj.add(-10); 		
	});
	thisObj.minus = $('<a></a>');
	thisObj.minus.addClass('minus');
	thisObj.container.append(thisObj.minus);
	thisObj.minus.click(function() {
		thisObj.add(-1); 		
	});
	

	thisObj.slideArea =  $('<div></div>');
	thisObj.container.append(thisObj.slideArea);
	
	thisObj.plus = $('<a></a>');
	thisObj.plus.addClass('plus');
	thisObj.container.append(thisObj.plus);
	thisObj.plus.click(function() {
		thisObj.add(1); 		
	});
	thisObj.plus10 = $('<a></a>');
	thisObj.plus10.addClass('plus10');
	thisObj.container.append(thisObj.plus10);
	thisObj.plus10.click(function() {
		thisObj.add(10); 		
	});
	
	if (thisObj.specialValue > 0) {
		thisObj.special = $('<a></a>');
		thisObj.special.addClass('specialValue');
		thisObj.container.append(thisObj.special);
		thisObj.special.click(function() {
			thisObj.setValue(thisObj.specialValue); 		
		});
		thisObj.special.attr('title', LOCA.sliderSpecialValue);
		thisObj.special.mouseover(tooltip.show);
		thisObj.special.mouseout(tooltip.hide);
	}
	
	thisObj.slideArea.slider({value:thisObj.value, animate: true, min:thisObj.minValue, max:thisObj.maxValue});
	thisObj.slideArea.bind('slide', function(event, ui) {
		thisObj.setValue(thisObj.slideArea.slider('option', 'value'));
	    setTimeout(function() {thisObj.setValue(thisObj.slideArea.slider('option', 'value'));},1); 
	 });
	
	thisObj.slideArea.bind('slidestop', function() {
		var val = Math.round(thisObj.slideArea.slider('option', 'value'));
	 });
	
	
	this.setValue = function(value) {
		thisObj.value = thisObj.testValue(value);
		thisObj.slideArea.slider('value', thisObj.value); 		
		thisObj.elmInput.value = thisObj.value;
	}
	this.testValue = function(value) {
		return Math.max(thisObj.minValue, Math.min(thisObj.maxValue, value));
	}
	
	this.add = function(value) {
		thisObj.setValue(parseInt(thisObj.value)+value);
	} 
	this.save = function() {
	 	//alert('huhu'+thisObj.value);
		elm('delta'+thisObj.nr).style.color = '#000';
		ajaxRequest(thisObj.ajaxAction + '&count='+ Math.round(thisObj.value), function(responseText) {
			thisObj.startValue = thisObj.value;
			
			showDragonStat(responseText);	
		});	
	 } 
	
	 this.containerClose = function() {
	 	if (thisObj.closeTimeout) {
	 		clearTimeout(thisObj.closeTimeout);
	 	}
	 	thisObj.closeTimeout = setTimeout(
			function() {
			 	if (!thisObj.elmInput.flagOver && !thisObj.elmInput.flagFocus && !thisObj.container.flagOver) {
				 	thisObj.container.hide();
	 				$(thisObj.elmInput).removeClass('active');
				}
				//console.log(thisObj.elmInput.flagOver  +'#'+ thisObj.elmInput.flagFocus  +'#'+ thisObj.container.flagOver);
			}
		, 500);
	 }
	 this.containerCloseNow = function() {
	 	thisObj.container.hide();
	 	$(thisObj.elmInput).removeClass('active');
	 	thisObj.elmInput.flagOver=false;
	 	thisObj.elmInput.flagFocus=false;
	 	thisObj.container.flagOver=false;
	 }
	
	 thisObj.setValue(thisObj.value);
}


function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return '';
}
function setCookie (name, value) {
		document.cookie = name + "=" + escape (value) + ";";
}
