// belated png fix
if ($.browser.msie && ($.browser.version.substr(0,3)=="6.0" || $.browser.version.substr(0,2)=="5.")) {
	DD_belatedPNG.fix('.png-fix, .right-menu ul li a, .map-hint, .hotel-stars, .form-bottom');
}

var spacerSrc = "/img/u/spacer.gif";

/**
 * ie bg blink - prevent
 */
eval("try {document.execCommand('BackgroundImageCache', false, true);} catch(e) {}");

/**
 * objekt pro lepsi spravu stringu
 */
function StringBuffer() {
	this.buffer = "";
	this.append = function(str) { this.buffer += str; return this; };
	this.getString = function() { return this.buffer; };
	this.reset = function() { this.buffer=""; };
}

/**
 * enhanced string - odstraneni diakritiky
 */
String.prototype.removeDiacritic = function() {
	var sdiak = new Array( /[áäàâãå]/g, /[čćĉ]/g, /[ď]/g, /[éěèêë]/g, /[íìîï]/g, /[ĺľ]/g, /[ňñ]/g, /[óòôö]/g, /[ŕř]/g, /[šśŝ]/g, /[ť]/g, /[úůüùûű]/g, /[ýÿŷ]/g, /[ž]/g, /[ÁÄÀÂÃÅ]/g, /[ČĆĈ]/g, /[Ď]/g, /[ÉĚÈÊË]/g, /[ÍÌÎÏ]/g, /[ĹĽ]/g, /[ŇÑ]/g, /[ÓÒÔÖ]/g, /[ŔŘ]/g, /[ŠŚŜ]/g, /[Ť]/g, /[ÚŮÜÙÛŰ]/g, /[ÝŶŸ]/g, /[Ž]/g);
	var bdiak = new Array("a","c","d","e","i","l","n","o","r","s","t","u","y","z","A","C","D","E","I","L","N","O","R","S","T","U","Y","Z");
	var str = this;
	for (var i=0; i<sdiak.length; i++){
		str = str.replace((sdiak[i]), bdiak[i]);
	}
	return str;
};

/**
 * vyhledani hodnoty val v poli a navrat indexu prvni vyhledane polozky
 * @param val
 */
Array.prototype.lookupEntry = function(val) {
	for (i=0; i<this.length; i++) {
		if (this[i] == val) return i;
	}
};

/**
 * funkce na zaokrouhlovani
 * @param cislo
 * @param pocetMist - pocet desetinnych mist
 */
function roundToFloat(cislo, pocetMist) {
	return Math.round(cislo*Math.pow(10, pocetMist))/Math.pow(10, pocetMist);
}

// pomocna funkce, ktera zjisti, zda je promenna v parametru definovana
function isUndefined(vr) {
	return (typeof(vr) == "undefined" || (vr == null)) ? true : false;
}

function setIframeHeight(h,f) {
    $("#"+f).attr({
           height: h
     });
}

/* cteni parametru url */
function getParameter(name) {
	if(typeof document.parameters == "undefined") {
		setupParameters();
	}
	return document.parameters[name];
}
function setupParameters() {
	var parameters = new Object();
	if(window.location.search) {
		var paramArray = window.location.search.substr(1).split('&');
		var length = paramArray.length;
		for (var index = 0;index <length; index++ ) {
			var param = paramArray[index].split('=');
			var name = param[0];
			var value =
			typeof param[1] == "string"
				? decodeURIComponent(param[1].replace(/\+/g, ' '))
				: null;
			parameters[name] = value;
		}
	}
	document.parameters = parameters;
}

/* cookies skripts - uses $.cookie (jquery.js) */
function setCookie(cookieName, cookieValue, cookieExpirationDays) {
	if (cookieExpirationDays) {
		$.cookie(cookieName, cookieValue, { expires: cookieExpirationDays, path: '/' });
	} else {
		$.cookie(cookieName, cookieValue, { path: '/' });
	}
}

function delCookie(cookieName) { $.cookie(cookieName, null, { path: '/' }); }
function getCookie(cookieName) { return $.cookie(cookieName); }


/**
 * nahrazeni nojs prepinani jazyku dhtml selectem
 */
function initLangSwitch() {
	var oId = "#lng-select";
	var sb = new StringBuffer();
	$("a:eq(0)", $(oId)).each(function() {
		sb.append('<a href="'+$(this).attr("href")+'"><span class="l-'+$(this).attr("href").substr(1,2)+'">'+$("img", $(this)).attr("title")+'</span></a>');
	});
	sb.append('<ul>');
	$("a:gt(0)", $(oId)).each(function() {
		sb.append('	<li><a href="'+$(this).attr("href")+'"><span class="l-'+$(this).attr("href").substr(1,2)+'">'+$("img", $(this)).attr("title")+'</span></a></li>');
	});
	sb.append('</ul>');
	$(oId).html(sb.getString()).addClass("lng-script");
	$("a:eq(0)", $(oId)).bind("click", function(event) {
		$("ul", $(oId)).fadeToggle(150);
		event.preventDefault();
	});
}

function initDhtmlSelects() {
	$(".dhtml-select").each(function() {
		var oEl = $(this);
		var index = $(".dhtml-select").index(this);
		var oW = $(this).width()-8;
		$("a:eq(0)", oEl).bind("click", function(event) {
			$(".dhtml-select:gt("+index+") ul, .dhtml-select:lt("+index+") ul").hide();
			$("ul", oEl).width(oW).fadeToggle(150);
			event.preventDefault();
		});
	});
}

/**
 * setMotiveSize - nastaveni motivu stranky - sirka + zachovani pomeru
 */
var motiveMaxWidth = 1920;
var motiveMinWidth = 954;
var motiveRatio = 1;
function setMotiveSize(type) {
	for (i=0; i<2; i++) {
		var aw = $(window).width();
		if (aw < motiveMinWidth) { aw = motiveMinWidth; }
		if (aw > motiveMaxWidth) { aw = motiveMaxWidth; }
		var h = aw/motiveRatio;
		if (type == "img") {
			$("#p-motive img#motive").width(aw).height(h);
		}
		if (type == "flashHP") {
			$("#p-motive #flashMotiveHP").width(aw).height(h);
		}
	}
}

/**
 * SimpleBoxSwitch = trida pro prepinani boxu
 * - zadny timer
 * - prepinani boxu pouze na klik
 * - vygenerovani controls
 *
 * - idBox = id celeho boxu
 * - classNaviCont = id pro div, do ktereho vlozime navigaci
 * - classPrefixItem = predpona classy kazdeho z prepinanych prvku. Zbytek musi byt cislovani od 1. Tzn treba day1, day2,..., dayN. Predpona je day
 * - rotateItems = bool, info o tom, zda se ma po dosazeni posledniho prvku skocit na zacatek
 */
function SimpleBoxSwitch(idBox, classNaviCont, classPrefixItem, rotateItems) {
	var thisObj = this;
	this.actualBox = 1;
	this.itemsCount = 1;
	this.idBox = "#"+idBox;
	this.classNaviCont = classNaviCont;
	this.classPrefixItem = classPrefixItem;
	this.rotateItems = rotateItems;

	this.init = function() {
		var bObj = $(this.idBox);
		this.itemsCount = $("div[class^='"+this.classPrefixItem+"']", bObj).size();
		$("div[class^='"+this.classPrefixItem+"']:gt(0)", bObj).hide();
		if (this.itemsCount <= 1) return false;
		this.writeControls();
	};

	this.writeControls = function() {
		var sb = new StringBuffer();

		sb.append('<a href="#" class="prev">'+locale["prev"]+'</a>\n');
		sb.append('<a href="#" class="next">'+locale["next"]+'</a>\n');
		$("."+this.classNaviCont, $(this.idBox)).prepend(sb.getString());
		if (!this.rotateItems) {
			$("."+this.classNaviCont+":first a:first", $(this.idBox)).addClass("prev-disabled");
			$("."+this.classNaviCont+":last a:last", $(this.idBox)).addClass("next-disabled");
		}

		$("a[class*='prev']", $(this.idBox+" ."+this.classNaviCont)).click(function(event) {
			if ($(this).attr("class").indexOf("disabled") < 0) {
				thisObj.showPrev();
			}
			event.preventDefault();
		});

		$("a[class*='next']", $(this.idBox+" ."+this.classNaviCont)).click(function(event) {
			if ($(this).attr("class").indexOf("disabled") < 0) {
				thisObj.showNext();
			}
			event.preventDefault();
		});
	};

	this.showPrev = function() {
		$("."+classPrefixItem+this.actualBox, $(this.idBox)).hide();
		this.actualBox--;
		if (this.actualBox == 0) { this.actualBox = this.itemsCount; }
		$("."+classPrefixItem+this.actualBox, $(this.idBox)).show();
	};
	this.showNext = function() {
		$("."+classPrefixItem+this.actualBox, $(this.idBox)).hide();
		this.actualBox++;
		if (this.actualBox > this.itemsCount) { this.actualBox = 1; }
		$("."+classPrefixItem+this.actualBox, $(this.idBox)).show();
	};

	this.init();

}

/**
 * spravni cleneni prahy -  /cs/informace/o-praze/zakladni-info/spravni-cleneni-prahy.shtml 
 */
function countyInit() {
	$("#county ul li").hide();
	$("#county #map #m-1 a").addClass("active");
	$("#county ul #c-1").show();

	$("#county #map li a").click( function () {
		if (($.browser.msie) && ($.browser.version.substr(0,1)=="6")) {
			$("#county #map li a").css("background-position","0px 0px");
			$(this).css("background-position","0px -15px");
		}
		else {
			$("#county #map li a").removeClass("active");
			$(this).addClass("active");
		}
	    var activeItem = $(this).attr("href");
		$("#county ul li").hide();
		$("#county ul " + activeItem).show();
	    return false;
	});
}
// sochy na Karlove moste
function statuesInit() {
	$("#statues ul li").hide();
	$("#statues #map #m-1 a").addClass("active");
	$("#statues ul #s-1").show();

	$("#statues #map li a").click( function () {
		if (($.browser.msie) && ($.browser.version.substr(0,1)=="6")) {
			$("#statues #map li a").css("background-position","0px 0px");
			$(this).css("background-position","0px -15px");
		}
		else {
			$("#statues #map li a").removeClass("active");
			$(this).addClass("active");
		}
	    var activeItem = $(this).attr("href");
		$("#statues ul li").hide();
		$("#statues ul " + activeItem).show();
	    return false;
	});
}

/**
 * funkce automaticky vytvori z H2 na strance seznam kotev .. a umisti ho do divu s id js-list-anchors
 */
function createAnchorList(cols) {
	var h2s = $("#p-left-content .in h2");
	var col1cnt = parseInt(h2s.size()/cols);
	var col2cnt = col1cnt*2;
	var col3cnt = -50;
	var col4cnt = -50;
	if (cols > 3) col3cnt = col1cnt*3;
	if (cols > 4) col4cnt = col1cnt*4;

	if (h2s.size()%cols > 0) { col1cnt++; col2cnt++; col3cnt++; col4cnt++; }
	if (h2s.size()%cols > 1) { col2cnt++; col3cnt++; col4cnt++; }
	if (h2s.size()%cols > 2) { col3cnt++; col4cnt++; }
	if (h2s.size()%cols > 3) { col4cnt++; }

	var sb = new StringBuffer();
	sb.append('<ul>\n');
	h2s.each(function() {
		var h2Id = "js-anchor-list-anchor-" + (h2s.index(this)+1);
		$(this).attr("id", h2Id);
		sb.append('	<li><a href="#'+h2Id+'">'+$(this).text()+'</a></li>\n');
		if ((h2s.index(this)+1) == col1cnt || (h2s.index(this)+1) == col2cnt || (h2s.index(this)+1) == col3cnt || (h2s.index(this)+1) == col4cnt) {
			sb.append('</ul>\n<ul>\n');
		}
	});
	sb.append('</ul>\n');

	$("#js-list-anchors").html(sb.getString()).addClass("list-anchors-activated").addClass("clr").addClass("cols"+cols);
}

/**
 * rozdeli UL seznam do dvou sloupcu
 * @param obj
 */
function splitListToTwoCols(obj) {
	if (!obj) return;
	var liCount = $(obj+" li").size();
	if (liCount <= 1) return;
	$(obj).wrap('<div id="js-generated-two-cols-div" class="two-cols clr"></div>');
	var actualContent = $("#js-generated-two-cols-div").html();
	var splitter = (liCount%2 == 0) ? parseInt(liCount/2) : parseInt((liCount/2)+1);
	$("#js-generated-two-cols-div").append(actualContent);
	$(obj+":first").addClass("fl");
	$(obj+":last").addClass("fr");
	$(obj+".fl li:gt("+(splitter-1)+")").remove();
	$(obj+".fr li:lt("+splitter+")").remove();
}

$.fn.setLiRowHeight = function(columnCount) {
	var actHeight = 0;
	var liCount = $(">li", $(this)).size();
	var linesCount = Math.floor(liCount/columnCount);

	for (i=0; i < linesCount; i++) {
		actHeight = 0;

		for (j = i*columnCount; j < i*columnCount+columnCount; j++) {
			actHeight = ($(">li:eq("+j+")", $(this)).height() > actHeight) ? $(">li:eq("+j+")",  $(this)).height() : actHeight;
		}
		$(">li", $(this)).filter(function(index){
			return index >= i*columnCount && index < i*columnCount+columnCount; 
		}).css("height",actHeight);
	}
};

$.fn.setLiRowHeightIndexes = function(columnCount) {
	var actHeight = 0;
	var liCount = $(">li p", $(this)).size();
	var linesCount = Math.floor(liCount/columnCount);

	for (i=0; i <= linesCount; i++) {
		actHeight = 0;

		for (j = i*columnCount; j < i*columnCount+columnCount; j++) {
			actHeight = ($(">li:eq("+j+") p", $(this)).height() > actHeight) ? $(">li:eq("+j+") p",  $(this)).height() : actHeight;
		}
		$(">li p", $(this)).filter(function(index){
			return index >= i*columnCount && index < i*columnCount+columnCount; 
		}).css("height",actHeight);
	}
};

/**
 *
 * @param id
 * @param mapWidth
 * @param mapHeight
 * @param bgrImg - pozadi velkeho obrazku over verze mapy
 * @param action - co se ma provest na klik na area
 * 		-> fillSelectAndSubmit - vyplni se select, jehoz id je druhym slovem v teto promenne (priklad: "fillSelectAndSubmit frmSelectId") a cely form se submitne
 * 		-> fillSelect - vyplni se select, jehoz id je druhym slovem v teto promenne (priklad: "fillSelect frmSelectId")
 */
function ImageMap(id, mapWidth, mapHeight, bgrImg, action) {
	this.id = id;
	this.map = $("img[usemap$='"+id+"']");
	this.mapH = mapHeight;
	this.mapW = mapWidth;
	this.action = action;

	this.overId = "IM-"+id;
	this.mapOver = null;

	this.init = function() {
		this.map.after('<p class="map-hint" id="map-hint-'+this.id+'">'+locale['map-'+id]+'</p>');
		this.map.after('<img src="' + spacerSrc + '" class="map-over" id="'+this.overId+'" style="width: '+this.mapW+'px; height: '+this.mapH+'px" alt="" usemap="#'+this.id+'" />');
		this.mapOver = $("#"+this.overId);
		this.mapOver.css("background-image", "url('"+bgrImg+"')");
		var mapAreas = $("map[name='"+this.id+"'] area");

		for (var i=0; i< mapAreas.length; i++) {
			$(mapAreas[i]).attr("rel", "area"+(i+1));
			/***/
			$(mapAreas[i]).data("title", $(mapAreas[i]).attr("title"));
			$(mapAreas[i]).data("alt", $(mapAreas[i]).attr("alt"));
			/***/
			$(mapAreas[i]).attr("title", "");
			mapAreas[i].onmouseover = function(e) {
				var areaCnt = $(this).attr("rel").substring(4);
				$("#map-hint-"+id).text($(this).data("alt"));
				eval(id+".toggleArea("+areaCnt+")");
			};
			mapAreas[i].onmouseout = function() {
				eval(id+".toggleArea(0)");
			};

			if (typeof(this.action) != "undefined") {
				$(mapAreas[i]).bind("click", function(event) {

					if (action.indexOf("fillSelect") > -1) {
						var reqSelect = action.substr(action.lastIndexOf(" ")+1);
						var reqArea = -1;
						$("#"+reqSelect+" option[value='"+$(this).data("title")+"']").each(function() {
							reqArea = $("#"+reqSelect+" option").index(this);
						});
						document.getElementById(reqSelect).selectedIndex = reqArea;

						if (action.indexOf("fillSelectAndSubmit ") > -1) {
							document.getElementById(reqSelect).form.submit();
						}
					}
					event.preventDefault();
				});
			}

			$("#"+this.id).bind("mouseout", function() {
				$("#map-hint-"+id).text(locale['map-'+id]);
			});
		}

	};

	this.toggleArea = function(area) {
		var posY = -1*(parseInt(area)*this.mapH);
		this.mapOver.css("background-position", "0px "+posY+"px");
	};

	this.init();
}

/**
 * inicializace
 */
$(document).ready(function() {
	// languages init
	initLangSwitch();

	// dhtml selects - aktivace z UL/LI
	initDhtmlSelects();

	// button pro tisk

	$(".printable #p-left-content>.in, .printable #p-full-content>.in").append('<p id="print"><a href="javascript:window.print()">'+locale["print"]+'<span></span></a></p>');

	// img motive init
	if ($("#p-motive img#motive").size() == 1) {
		var motive = $("#p-motive img#motive");
		motiveRatio = motive.width()/motive.height();
		$(window).resize(function(){
  			setMotiveSize("img");
		});
		setMotiveSize("img");
	}
	// flash motive init
	if ($("#p-motive #flashMotiveHP").size() == 1) {
		motiveRatio = 1280/280;
		$(window).resize(function(){
  			setMotiveSize("flashHP");
		});
	}

	// seznam kotev init
	if ($("#js-list-anchors").size() == 1) {
		var jsListAnchors = 0;
		if ($("#js-list-anchors").attr("class") != "") { jsListAnchors = $("#js-list-anchors").attr("class").replace("cols",""); }
		if (jsListAnchors < 3 || jsListAnchors > 5) jsListAnchors = 3;
		createAnchorList(jsListAnchors);
	}

	// navigation settings
	$("#p-menu>ul>li").mouseover(function(){
		$(this).addClass("hover");
	}).mouseout(function(){
		$(this).removeClass("hover");
	});

	// img boxes - h2 activation
	$(".box h2").hover(function() {
		$(this).addClass("hover");
	}, function() {
		$(this).removeClass("hover");
	}).click(function() {
		window.location.href = $("a:eq(0)", $(this)).attr("href");
	});

	// gallery zoom ico
	$("a.highslide.hs-expand").append('<span></span>');

	// map selecty - auto submit form
	$(".map-box form select").bind("change", function() { this.form.submit(); } );

	// fitt plugin na search inputy
	$(".fitt").fitt({classBlur: 'text', classFocus: 'text' });

	// aktivace selectu v rozeskoku
	$(".p-index li select").bind("change", function() {
		var url = $("option:selected", $(this)).attr("value");
		if (url=="") return false;
		window.location.href= url;
	}).show();
	
	$(".p-index").setLiRowHeightIndexes(4);
});

function clearFitt(obj) {
	$(".fitt", $(obj)).each(function() {
		if (($(this).attr("value") == this.defaultValue) || ($(this).attr("value") == this.defaultValue.removeDiacritic())) {
			$(this).attr("value", "");
		}
	});
}

function sendHpCalendar(obj) {
	clearFitt(obj);
	var dateStr = $("#frmCalendarDate").attr("value");
	if (dateStr == "" || typeof(dateStr) == "undefined") { return true; }
	$("#frmCalendarDays").attr("value", dateStr.substring(0, dateStr.indexOf(". ")));
	$("#frmCalendarMonth").attr("value", dateStr.substring(dateStr.indexOf(". ")+2,dateStr.lastIndexOf(". ")));
	$("#frmCalendarYear").attr("value", dateStr.substring(dateStr.lastIndexOf(". ")+2, dateStr.length));
	return true;
}

var activeCard = "card-back";
var hiddenCard = "card-front";
var cardProperties = new Array();
cardProperties['card-back-width'] = '516px';
cardProperties['card-front-width'] = '548px';
var ecardTurnClicked = false;

function turnEcard() {
	if (ecardTurnClicked) return;
	ecardTurnClicked = true;
	$(".cards .card *").hide();
	$("."+hiddenCard).css({"width" : "0px", "margin-left": "258px" });
	$("."+activeCard).animate({
		width: '0px',
		marginLeft: '+=258',
		opacity: 0
	}, 300, function() {
		$("."+activeCard).hide();
		$("."+hiddenCard).animate({
			width: cardProperties[hiddenCard+"-width"],
			marginLeft: '0',
			opacity: 1
		}, 500, function() {
			$("."+hiddenCard+" *").show();
			var tmp = activeCard;
			activeCard = hiddenCard;
			hiddenCard = tmp;
			ecardTurnClicked = false;
		});

	});

}

function initFastNavigation() {
	document.write('<p class="fl" id="bottom-fast-navi"></p>');
	if(isUndefined(getCookie('FG_PRIS_BottomNavigState'))) {
		setCookie("FG_PRIS_BottomNavigState", "shown", 365);
	}

	if (getCookie("FG_PRIS_BottomNavigState") == "hidden") {
		$("#bottom-fast-navi").append('<a href="javascript:toggleFastNavigation()">'+locale['show-bottom-navig']+'</a>').addClass("bottom-navig-show");
		$("#p-bottom-sitemap>div").hide();
	} else if (getCookie("FG_PRIS_BottomNavigState") == "shown") {
		$("#bottom-fast-navi").append('<a href="javascript:toggleFastNavigation()">'+locale['hide-bottom-navig']+'</a>').addClass("bottom-navig-hide");
		$("#p-bottom-sitemap>div").show();
	}
}

function toggleFastNavigation() {
	if (getCookie("FG_PRIS_BottomNavigState") == "hidden") {
		$("#bottom-fast-navi").html('<a href="javascript:toggleFastNavigation()">'+locale['hide-bottom-navig']+'</a>').removeClass("bottom-navig-show").addClass("bottom-navig-hide");
		$("#p-bottom-sitemap>div").slideDown();
		setCookie("FG_PRIS_BottomNavigState", "shown", 365);
	} else if (getCookie("FG_PRIS_BottomNavigState") == "shown") {
		$("#bottom-fast-navi").html('<a href="javascript:toggleFastNavigation()">'+locale['show-bottom-navig']+'</a>').removeClass("bottom-navig-hide").addClass("bottom-navig-show");
		$("#p-bottom-sitemap>div").slideUp();
		setCookie("FG_PRIS_BottomNavigState", "hidden", 365);
	}
}

function toggleCollapsableElement(objId, thisObj, newThisText) {
	$("#"+objId).slideToggle( function() {
		if (typeof($(thisObj).data("originalText")) == "undefined") {
			$(thisObj).data("originalText", $(thisObj).text());
		}

		if ($(thisObj).data("originalText") == $(thisObj).text()) {
			$(thisObj).text(newThisText);
		} else {
			$(thisObj).text($(thisObj).data("originalText"));
		}
	});

}

/* formulare */
/**
 * odstraneni diakritiky z formu, ktere pouzivaji get
 * @param mixed - pole s id inputu, ktere chceme odcestit                                       
 */
function frmRemoveDiacritics(mixed) {
	if (!mixed || mixed.length < 1) {
		return;
	}
	for(var i = 0; i < mixed.length; i++) {
		//alert(i+'\n\n'+mixed[i]+'\n\n'+$("#"+mixed[i]).attr("value"));
		var nonDiag = $("#"+mixed[i]).attr("value");
		$("#"+mixed[i]).attr("value", String(nonDiag).removeDiacritic());
	}
}

/* spolecny script pro banner booking.com */
function addzero( value )
{
	while( value.length<2 ) value = String("0") + value;
	return value;
}
function checkDateOrder(frm, ci_day, ci_month_year, co_day, co_month_year) {
	if (document.getElementById) {
		var frm = document.getElementById(frm);
		// create date object from checkin values
		// set date to 12:00 to avoid problems with one
		// date being wintertime and the other summertime
		var my = frm[ci_month_year].value.split("-");
		var ci = new Date (my[0], my[1]-1, frm[ci_day].value, 12, 0, 0, 0);
		// create date object from checkout values
		my = frm[co_month_year].value.split("-");
		var co = new Date (my[0], my[1]-1, frm[co_day].value, 12, 0, 0, 0);
		// if checkin date is at or after checkout date,
		// add a&nbsp;day full of milliseconds, and set the
		// selectbox values for checkout date to new value
		if (ci >= co){
			co.setTime(ci.getTime() + 1000 * 60 * 60 * 24);
			frm[co_day].value =  co.getDate();
			var com = co.getMonth()+1;
			frm[co_month_year].value = co.getFullYear() + "-" + com;
		}
	}
}

