	function EID(id) {
		return document.getElementById(id);
	}

	function divFill(url, fid) {jQuery.ajax({type: 'GET', cache: false, url: url, dataType: 'html', success: function(d) {jQuery('#'+fid).html(d);}});}
	function divFillPI(url, fid) {jQuery('#PI').fadeIn('fast', function() {jQuery.ajax({type: 'GET', cache: false, url: url, dataType: 'html', success: function(d) {jQuery('#'+fid).html(d);}});}).fadeOut('fast');}
	function dfpi(url, fid){jQuery('#PI'+fid).fadeIn('fast', function() {jQuery.ajax({type: 'GET', cache: false, url: url, dataType: 'html', success: function(d) {jQuery('#'+fid).html(d);}});}).fadeOut('fast');}
	function st(id) {jQuery('#'+id).fadeIn('fast');}           	
	function ht(id) {jQuery('#'+id).fadeOut('fast');}           	
	function postFill(url, str, fid) {jQuery.ajax({type: 'POST', cache: false, url: url, data: str, dataType: 'html', success: function(d) {jQuery('#'+fid).html(d);}});}

	function getValuesByClass(classID) {
		var getstr = '';
		obj = getElementsByClass(classID);
		for (i=0; i<obj.length; i++) {
			if (obj[i].tagName == "INPUT" || obj[i].tagName == "TEXTAREA" || obj[i].tagName == "HIDDEN") {
				if (obj[i].type == "text" ||obj[i].type == "password" || obj[i].type == "submit" || obj[i].type == "textarea" || obj[i].type == "hidden") {
					getstr += obj[i].name + "=" + encodeURIComponent(obj[i].value) + "&";
				}
				if (obj[i].type == "checkbox") {
					if (obj[i].checked) {
						getstr += obj[i].name + "=" + encodeURIComponent(obj[i].value) + "&";
					} else {
						getstr += obj[i].name + "=&";
					}
				}
				if (obj[i].type == "radio") {
					if (obj[i].checked) {
						getstr += obj[i].name + "=" + encodeURIComponent(obj[i].value) + "&";
					}
				}
			}

			if (obj[i].tagName == "SELECT") {
				var sel = obj[i];
				for (var is=0; is < sel.length; is++) {
					if(sel.options[is].selected) {
						getstr += sel.name + "=" + encodeURIComponent(sel.options[is].value) + "&";
					}
				}
			}
		}
		return getstr;
	}
	function gvbc(c) {return getValuesByClass(c);}
	function getElementsByClass(searchClass,node,tag) {
		var classElements = new Array();
		if (node == null)
		node = document;
		if (tag == null)
		tag = '*';
		var els = node.getElementsByTagName(tag);
		var elsLen = els.length;
		var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
		for (i = 0, j = 0; i < elsLen; i++) {
			if (pattern.test(els[i].className) ) {
				classElements[j] = els[i];
				j++;
			}
		}
		return classElements;
	}
	function cUc(id) {var i = jQuery('#'+id);if(i.is(':checked')) {i.attr('checked', 0);}else{i.attr('checked', 1);}}

	function pn_h(o, i) {
	    o.style.backgroundColor = o.style.backgroundColor? "":"#12679B";
	    o.style.backgroundImage = "url('/img/"+i+"_hover_icn.png')";
	    o.onmouseout = function() { pn_h(this, i);o.style.backgroundImage = "url('/img/"+i+"_icn.png')"; };
	}
	function dhPrev(obj) {
	    obj.style.backgroundColor = obj.style.backgroundColor? "":"#12679B";
	    obj.style.backgroundImage = "url('/img/prev_hover_icn.png')";
	    obj.onmouseout = function() { dhPrev(this);obj.style.backgroundImage = "url('/img/prev_icn.png')"; };
	}

	function dhNext(obj) {
	    obj.style.backgroundColor = obj.style.backgroundColor? "":"#12679B";
	    obj.style.backgroundImage = "url('/img/next_hover_icn.png')";
	    obj.onmouseout = function() { dhNext(this);obj.style.backgroundImage = "url('/img/next_icn.png')"; };
	}
	
	function buttonHover(obj) {
	    obj.style.backgroundColor = obj.style.backgroundColor? "":"#eeeeee";
	    obj.onmouseout = function() { buttonHover(this); };
	}
	

	var upi_ol = {
		go: function(url, op) {
			upi_ol.ol_shown = 1;
			var cont_div = jQuery('#upi_ol_div').find('.content');
			jQuery('#upi_ol_div').css({width: '200px', height: '40px'});
			cont_div.css({width: '200px', height: '40px'});
			cont_div.empty().html('<div style="text-align: center; padding: 15px;" id="pi"><img src="/img/loading_long.gif"></div>')
			upi_ol.xy_opac(1);
			jQuery('#upi_ol_div').fadeIn('fast');
    		var ol_x = op.x ? op.x : 500;
    		var ol_y = op.y ? op.y : 500;
    		if(ol_x >= jQuery(window).width()) ol_x = jQuery(window).width() - 100;
    		if(ol_y >= jQuery(window).height()) ol_y = jQuery(window).height() - 100;

			if(op.iframe) {
    			cont_div.append('<iframe src="'+url+'"style="width: 0px; height: 0px; border: 0px; visibility: hidden;" frameborder="0" id="upi_ol_iframe">');
    			var if_rs = jQuery('#upi_ol_iframe');
    			if(op.resize) {
					if_rs.load(function() {
						var y_h = if_rs.contents().find("html").height();
						if(op.resize && y_h && y_h < jQuery(window).height()) {
							jQuery('#upi_ol_div').css({width: ol_x+'px', height: y_h+'px'});
							if_rs.css({width: ol_x+'px', height: y_h+'px'});
							jQuery('#upi_ol_div .content').css({width: ol_x+'px', height: ol_y+'px'});
						}else{
							if_rs.css({width: ol_x+'px', height: ol_y+'px'});
							jQuery('#upi_ol_div').css({width: ol_x+'px', height: ol_y+'px'});
							jQuery('#upi_ol_div .content').css({width: ol_x+'px', height: ol_y+'px'});
						}
						upi_ol.center();
						cont_div.find('#pi').fadeOut('fast', function() {cont_div.find('iframe').css({visibility: ''})});
					});
				}else{
					if_rs.css({width: ol_x+'px', height: ol_y+'px'});
					jQuery('#upi_ol_div').css({width: ol_x+'px', height: ol_y+'px'});
					jQuery('#upi_ol_div .content').css({width: ol_x+'px', height: ol_y+'px'});
					upi_ol.center();
					cont_div.find('#pi').fadeOut('fast', function() {cont_div.find('iframe').css({visibility: ''})});
				}
			} else {
				if(op) jQuery('#upi_ol_div').css({width: ol_x+'px', height: ol_y+'px'});
				jQuery('#upi_ol_div .content').css({width: ol_x+'px', height: ol_y+'px'});
    			jQuery.ajax({
    				type: 'GET', cache: false, url: url, 
    				dataType: 'html', 
    				success: function(d) {
    					jQuery('#upi_ol_div').fadeIn(function() {jQuery('#upi_ol_div .content').html(d);});
    					upi_ol.center();
    					cont_div.find('#pi').fadeOut('fast');
    				}
    			});
			}
			return false;
		},
		ol: function(op) {
			upi_ol.ol_shown = 1;
			var cont_div = jQuery('#upi_ol_div').find('.content');
			jQuery('#upi_ol_div').css({width: '200px', height: '40px'});
			upi_ol.xy_opac(1);
			jQuery('#upi_ol_div').fadeIn('fast');
    		var ol_x = op.x ? op.x : 500;
    		var ol_y = op.y ? op.y : 500;
    		if(ol_x >= jQuery(window).width()) ol_x = jQuery(window).width() - 100;
    		if(ol_y >= jQuery(window).height()) ol_y = jQuery(window).height() - 100;
			jQuery('#upi_ol_div').css({width: ol_x+'px', height: ol_y+'px'});
			jQuery('#upi_ol_div .content').css({width: ol_x+'px', height: ol_y+'px'});
    		if(op.text) jQuery('#upi_ol_div').fadeIn(function() {jQuery('#upi_ol_div .content').html(jQuery(op.id).html());});
    		if(op.img) jQuery('#upi_ol_div').fadeIn(function() {jQuery('#upi_ol_div .content').html('<div style="text-align: center; width: '+ol_x+'px, height: '+ol_y+'px"><img src="'+op.img+'"> </div>');});
    		upi_ol.center();
		},
		hide: function() {
			upi_ol.ol_shown = 0;
			jQuery('#upi_ol_bg').animate({opacity: 0}, 500).css({visibility:'hidden'});
			jQuery('#upi_ol_div').css({display:'none'})
			jQuery('#upi_ol_div .content').empty();
		},
		center: function (divid) {
			if(!divid) divid = 'upi_ol_div';
			var cc = jQuery('#'+divid);
			var xy_x = (jQuery(window).width() / 2) - (cc.width() / 2);
			var xy_y = (jQuery(window).height() / 2) - (cc.height() / 2) + jQuery(document).scrollTop();
			cc.css({left: xy_x+'px', top: xy_y+'px'});
		},
		xy_opac: function (sop) {
			var xy_x =  jQuery(document).width();
			var xy_y = jQuery(document).height();
			jQuery('#upi_ol_bg').css({width: xy_x+'px', height: xy_y+'px'});
			if(sop) jQuery('#upi_ol_bg').css({opacity:0, visibility:'visible'}).animate({opacity: 0.5}, 250);
			upi_ol.center();
		},
		ol_shown: 0
	}

	function upicc(n,v,d) {
		if (d) {var date = new Date();date.setTime(date.getTime()+(d*24*60*60*1000));var ex = "; expires="+date.toGMTString();}
		else var ex = "";
		document.cookie = n+"="+v+ex+"; path=/";
	}
	function upirc(key) {return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decodeURIComponent(result[1]) : null;}
	
	var feedback = {
		repos: function () {
			var cc = jQuery('#feedback_side');
			var xy_y = (jQuery(window).height() / 2) - (cc.height() / 2) + jQuery(document).scrollTop();
			cc.css({top: xy_y+'px'});
		}
	}
			
	jQuery(document).ready(function() {
		if(upirc('fd_shown') != 1) {
			upicc('fd_shown', 1, 7);
			jQuery(window).resize(function() {upi_ol.xy_opac(); feedback.repos();});
			jQuery(window).scroll(function() {feedback.repos();});
			feedback.repos();
			jQuery('#feedback_side').fadeIn('fast');
		}

	}).keyup(function(e) {
		if(e.keyCode == 27 && upi_ol.ol_shown) {upi_ol.hide();}
	});
	
	(function($){$.toJSON=function(o)
	{if(typeof(JSON)=='object'&&JSON.stringify)
	return JSON.stringify(o);var type=typeof(o);if(o===null)
	return"null";if(type=="undefined")
	return undefined;if(type=="number"||type=="boolean")
	return o+"";if(type=="string")
	return $.quoteString(o);if(type=='object')
	{if(typeof o.toJSON=="function")
	return $.toJSON(o.toJSON());if(o.constructor===Date)
	{var month=o.getUTCMonth()+1;if(month<10)month='0'+month;var day=o.getUTCDate();if(day<10)day='0'+day;var year=o.getUTCFullYear();var hours=o.getUTCHours();if(hours<10)hours='0'+hours;var minutes=o.getUTCMinutes();if(minutes<10)minutes='0'+minutes;var seconds=o.getUTCSeconds();if(seconds<10)seconds='0'+seconds;var milli=o.getUTCMilliseconds();if(milli<100)milli='0'+milli;if(milli<10)milli='0'+milli;return'"'+year+'-'+month+'-'+day+'T'+
	hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
	if(o.constructor===Array)
	{var ret=[];for(var i=0;i<o.length;i++)
	ret.push($.toJSON(o[i])||"null");return"["+ret.join(",")+"]";}
	var pairs=[];for(var k in o){var name;var type=typeof k;if(type=="number")
	name='"'+k+'"';else if(type=="string")
	name=$.quoteString(k);else
	continue;if(typeof o[k]=="function")
	continue;var val=$.toJSON(o[k]);pairs.push(name+":"+val);}
	return"{"+pairs.join(", ")+"}";}};$.evalJSON=function(src)
	{if(typeof(JSON)=='object'&&JSON.parse)
	return JSON.parse(src);return eval("("+src+")");};$.secureEvalJSON=function(src)
	{if(typeof(JSON)=='object'&&JSON.parse)
	return JSON.parse(src);var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
	return eval("("+src+")");else
	throw new SyntaxError("Error parsing JSON, source is not valid.");};$.quoteString=function(string)
	{if(string.match(_escapeable))
	{return'"'+string.replace(_escapeable,function(a)
	{var c=_meta[a];if(typeof c==='string')return c;c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
	return'"'+string+'"';};var _escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var _meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};})(jQuery);		
	
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
	
	
