function AnimateClouds(){
	$("#cloud1").animate({"left": "-148px"}, 150000,'linear',function(){
		$("#cloud1").animate({"left": "802px"}, 150000,'linear');
	});
	$("#cloud2").animate({"left": "436px"}, 150000,'linear',function(){
		$("#cloud2").animate({"left": "981px"}, 150000,'linear');
	});
	$("#cloud3").animate({"left": "780px"}, 150000,'linear',function(){
		$("#cloud3").animate({"left": "-145px"}, 150000,'linear');
	});
	$("#cloud4").animate({"left": "1025px"}, 150000,'linear',function(){
		$("#cloud4").animate({"left": "436px"}, 150000,'linear');
	});
}
function setCookie(name, value, days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
		var expires = "; expires=" + date.toGMTString();
	}
	else var expires = "";
	document.cookie = name + "=" + value + expires + "; path=/";
}
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 null;
}
function soundOFF(){
	setCookie('sounds','off',25);
}
function soundON(){
	setCookie('sounds','on',25);
}
var mail = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
var letters = ' ABCÇDEFGÐHIÝJKLMNÑOÖPQRSÞTUÜVWXYZabcçdefgðhýijklmnñoöpqrsþtuüvwxyzàáÀÁ&eacute;èÈ&Eacute;íìÍÌïÏóòÓÒúùÚÙüÜ';
var numbers = '1234567890';
function fixElement(obj,mess){alert(mess);obj.focus();}
function checkTC(tcno){
	if(tcno.substr(0,1)==0&&tcno.lenght!=11){
		return false;
	}
	var i = 9, md='', mc='', digit, mr='';
	while(digit = tcno.charAt(--i)){
		i%2==0 ? md += digit : mc += digit;
	}
	if(((eval(md.split('').join('+'))*7)-eval(mc.split('').join('+')))%10!=parseInt(tcno.substr(9,1),10)){
		return false;
	}
	for (c=0;c<=9;c++){
		mr += tcno.charAt(c);
	}
	if(eval(mr.split('').join('+'))%10!=parseInt(tcno.substr(10,1),10)){
		return false;
	}
	return true;
}
function alpha(e,allow){
	var k;
	k=document.all?parseInt(e.keyCode): parseInt(e.which);
	if (e.keyCode == 8 || e.keyCode == 9|| e.keyCode == 16 || e.keyCode == 46 || e.keyCode == 37 || e.keyCode == 39) return(allow);
	return (allow.indexOf(String.fromCharCode(k))!=-1);
}
function clearForms(form1){
	form.reset();
}



$(document).ready(function(){
	
	var flashvars = {};
	var params = {wmode: "transparent", scale: "showall", allowScriptAccess: "always", allowFullScreen: "true", loop: "true"};
	var attributes = {id: "videoplayer2"};
	swfobject.embedSWF("/i/Assets/swf/VideoPlayer.swf?path=http://www.avivasa.com.tr/i/Assets/videos/avivasa_sac_sac_35sn.flv", "advplayer2", "581", "384", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	

	
	$("#bsu input").each(function(i) {
		$(this).ezMark();
   	});
	

	if($("body").attr("id") == "mainhome"){
		$("#splash").css("opacity","0.5");
		if($.browser.msie && $.browser.version == "6.0"){
			$("#splash").css("height", $(document).height() - 4);
		}
		
		var flashvars = {};
		var params = {wmode: "transparent", scale: "noscale", allowScriptAccess: "always"};
		var attributes = {id: "splashFlash"};
		swfobject.embedSWF("/i/Assets/swf/avivasayenisplahs.swf", "splashFlash", "950", "550", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	}
	
	$("#splash,#closeSplash").click(function(){
		$("#splash,#closeSplash,#splashFlash").remove();
		return false;
	});
	

	$("a[rel='external']").click(function(){
		window.open($(this).attr("href"));
		return false;
	});
	$("table tr:odd").addClass("dif");
	$("#search").click(function(){
		$("#searchform").submit();
		return false;
	});
	$("#search2").click(function(){
		$("#searchform2").submit();
		return false;
	});
	
	
	$(".drst:odd").addClass("dif");

	$("#ia_services").hoverIntent(function(){
		if(!$("#iamenu").is(":animated")){
			$("#iamenu").slideDown(200);
		}
	},function(){
		$("#iamenu").slideUp(200);
	});

	
	$("#intbrnclink").click(function(){
		return false;
	});
	
	$("#intbrnc").hoverIntent(function(){
		if(!$("#intbrncmenu").is(":animated")){
			$("#intbrncmenu").slideDown(100);
		}
	},function(){
		$("#intbrncmenu").slideUp(100);
	});
	
	$("#cloud1, #cloud2, #cloud3, #cloud4").css({position: 'absolute'});//ie6 bug fixed	
	//$("#keyword").css({position: "absolute"});
	//$("#searchkey").css({position: "relative"});
	
	$("#navinner ul li a").click(function(){
		$(this).parent("li").addClass("active");
	});
	
	//Leftmenu	
	$(".leftmenu ul li a[href*=void]").removeAttr("onclick").click(function(){
		if($(this).parent("li").children("ul").length != 0){
			$(this).parent("li").children("ul").slideToggle(500);
			return false;
		}
	});

	$("p.summary:empty").remove();
	//$("img:hidden").remove();
	$("#navinner ul li:first-child").css("padding","0px");
	
	$("ul.acc li a:first-child").not(".item-content a").click(function(){
		$(this).parent("li").children(".item-content").slideToggle(300);
		$(this).parent("li").toggleClass("active");
		return false;
	});
	
	var year,month,ptype;
	
	$("#p_year").change(function(){

		ptype = "plannar.";

		if($(this).val() != "false"){
			year = "y" + $(this).val();
			$("#p_month").html("<option value=\"false\">Ay</option>");
			for (key in eval(ptype + year)){
				$("#p_month").append("<option value=\"" + key + "\">" + replaceMonth(key) + "</option>");
			}
			$("#p_month").removeAttr("disabled");
		}
		else{
			$("#p_month").html("<option value=\"false\">Ay</option>");
			$("#p_month").attr("disabled","disabled");
		}
	});
	$("#kp_year").change(function(){

		ptype = "kolayplan.";

		if($(this).val() != "false"){
			year = "y" + $(this).val();
			$("#p_month2").html("<option value=\"false\">Ay</option>");
			for (key in eval(ptype + year)){
				$("#p_month2").append("<option value=\"" + key + "\">" + replaceMonth(key) + "</option>");
			}
			$("#p_month2").removeAttr("disabled");
		}
		else{
			$("#p_month2").html("<option value=\"false\">Ay</option>");
			$("#p_month2").attr("disabled","disabled");
		}
	});
	
	$("#p_month").change(function(){
		if($(this).val() != "false"){
			window.open("http://" + window.location.host + eval("plannar." + year + "." + $(this).val()));
		}
	});
	$("#p_month2").change(function(){
		if($(this).val() != "false"){
			window.open("http://" + window.location.host + eval("kolayplan." + year + "." + $(this).val()));
		}
	});
	
	AnimateClouds();
	setInterval("AnimateClouds()",300000);
	

	
	$('#kdnt').bind('click',function(e){
		PopItUp('https://mweb.avivasa.com.tr/CommonsApp/jsp/makbuzSifre.jsp','pvwk','570','850');
		return false;
	});
	$('#pvw').bind('click',function(e){
		PopItUp('https://mweb.avivasa.com.tr/CommonsApp/fksBilgi.do?action=welcome','pvw','570','850');
		return false;
	});
	$('#ttpp').bind('click',function(e){
		PopItUp('https://mweb.avivasa.com.tr/CommonsApp/jsp/tazminatLogin.jsp','ttpp','600','850');
		return false;
	});
	$('#pvwx').bind('click',function(e){
		PopItUp('https://mweb.avivasa.com.tr/CommonsApp/fksBilgi.do?action=welcome','pvwx','570','850');
		return false;
	});
	$('#intcrp').bind('click',function(e){
		PopItUp('http://crm.avivasa.com.tr/KurumsalCReaM/login.jsp','intcrp','570','850');
		return false;
	});
	$('#intper').bind('click',function(e){
		PopItUp('https://mweb.avivasa.com.tr/E_LifePensionWeb/login.jsp','intper','570','850');
		return false;
	});
	$('#ysrl').bind('click',function(e){
		PopItUp('http://www.avivasa.com.tr/tr/bilgi/grafik_aciklamalari.aspx','ysrl','500','580');
		return false;
	});
	
	
});

function advPlay2(video){
	//var flashplayer = '<div id="advplayer"></div>';
	//$(".inner").append(flashplayer);
	var flashvars = {};
	var params = {wmode: "window", scale: "showall", allowScriptAccess: "always", allowFullScreen: "true"};
	var attributes = {id: "videoplayer"};
	swfobject.embedSWF("/i/Assets/swf/VideoPlayer.swf?path=http://www.avivasa.com.tr/i/Assets/videos/avivasa_sac_sac_35sn.flv" + video + "", "advplayer", "635", "384", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	return false;
}


function getCenter(pwidth,pheight){
	wwidth=screen.width;
	wheigth=screen.height;
	lpos= (wwidth - pwidth)/2;
	tpos= (wheigth - pheight)/2;
	return lpos, tpos;
}

function PopItUp(src,name,h,w,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,name,"toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars=1, menubar=0, resizable=1, copyhistory=0");
	Popwin.focus();
}

var plannar = {
	"y2008" : {
		March: "/i/Assets/pdf/plannar/2008/03_2008.pdf",
		April: "/i/Assets/pdf/plannar/2008/04_2008.pdf",
		May: "/i/Assets/pdf/plannar/2008/05_2008.pdf",
		June: "/i/Assets/pdf/plannar/2008/06_2008.pdf",
		July: "/i/Assets/pdf/plannar/2008/07_2008.pdf",
		August: "/i/Assets/pdf/plannar/2008/08_2008.pdf",
		September: "/i/Assets/pdf/plannar/2008/09_2008.pdf",
		October: "/i/Assets/pdf/plannar/2008/10_2008.pdf",
		November: "/i/Assets/pdf/plannar/2008/11_2008.pdf",
		December: "/i/Assets/pdf/plannar/2008/12_2008.pdf"
	},
	"y2009" : {
		January: "/i/Assets/pdf/plannar/2009/01_2009.pdf",
		February: "/i/Assets/pdf/plannar/2009/02_2009.pdf",
		March: "/i/Assets/pdf/plannar/2009/03_2009.pdf",
		April: "/i/Assets/pdf/plannar/2009/04_2009.pdf",
		May: "/i/Assets/pdf/plannar/2009/05_2009.pdf",
		June: "/i/Assets/pdf/plannar/2009/06_2009.pdf",
		July: "/i/Assets/pdf/plannar/2009/07_2009.pdf",
		August: "/i/Assets/pdf/plannar/2009/08_2009.pdf",
		September: "/i/Assets/pdf/plannar/2009/09_2009.pdf",
		October: "/i/Assets/pdf/plannar/2009/10_2009.pdf",
		November: "/i/Assets/pdf/plannar/2009/11_2009.pdf",
		December: "/i/Assets/pdf/plannar/2009/12_2009.pdf"
	    
	},
	"y2010" : {
		January: "/i/Assets/pdf/plannar/2010/01_2010.pdf",
		February: "/i/Assets/pdf/plannar/2010/02_2010.pdf",
		March: "/i/Assets/pdf/plannar/2010/03_2010.pdf",
		April: "/i/Assets/pdf/plannar/2010/04_2010.pdf",
		May: "/i/Assets/pdf/plannar/2010/05_2010.pdf",
		June: "/i/Assets/pdf/plannar/2010/06_2010.pdf",
		July: "/i/Assets/pdf/plannar/2010/07_2010.pdf",
		August : "/i/Assets/pdf/plannar/2010/08_2010.pdf",
		September : "/i/Assets/pdf/plannar/2010/09_2010.pdf",
	 October: "/i/Assets/pdf/plannar/2010/10_2010.pdf",
	 November: "/i/Assets/pdf/plannar/2010/11_2010.pdf",
	 December: "/i/Assets/pdf/plannar/2010/12_2010.pdf"
	},
	"y2011" : {
		January: "/i/Assets/pdf/plannar/2011/31_2011.pdf",
		February: "/i/Assets/pdf/plannar/2011/02_2011.pdf",
		March: "/i/Assets/pdf/plannar/2011/03_2011.pdf",
		April: "/i/Assets/pdf/plannar/2011/30-04-2011p.pdf",
		May: "/i/Assets/pdf/plannar/2011/31_05_2011.pdf",
		June: "/i/Assets/pdf/plannar/2011/30_06_11.pdf",
		July: "/i/Assets/pdf/plannar/2011/31-07-11.pdf",
		August: "/i/Assets/pdf/plannar/2011/31-08-11.pdf",
		September : "/i/Assets/pdf/plannar/2011/30_09_11.pdf",
		October : "/i/Assets/pdf/plannar/2011/31_10_11plannar.pdf",
		November : "/i/Assets/pdf/plannar/2011/30_11_11plannar.pdf",
		December : "/i/Assets/pdf/plannar/2011/31_12_11plannar.pdf"
}
};
var kolayplan = {
	"y2008" : {
		July: "/i/Assets/pdf/kolayplan/2008/07_2008.pdf",
		August: "/i/Assets/pdf/kolayplan/2008/08_2008.pdf",
		September: "/i/Assets/pdf/kolayplan/2008/09_2008.pdf",
		October: "/i/Assets/pdf/kolayplan/2008/10_2008.pdf",
		November: "/i/Assets/pdf/kolayplan/2008/11_2008.pdf",
		December: "/i/Assets/pdf/kolayplan/2008/12_2008.pdf"
	},
	"y2009" : {
		January: "/i/Assets/pdf/kolayplan/2009/01_2009.pdf",
		February: "/i/Assets/pdf/kolayplan/2009/02_2009.pdf",
		March: "/i/Assets/pdf/kolayplan/2009/03_2009.pdf",
		April: "/i/Assets/pdf/kolayplan/2009/04_2009.pdf",
		May: "/i/Assets/pdf/kolayplan/2009/05_2009.pdf",
		June: "/i/Assets/pdf/kolayplan/2009/06_2009.pdf",
		July: "/i/Assets/pdf/kolayplan/2009/07_2009.pdf",
		August: "/i/Assets/pdf/kolayplan/2009/08_2009.pdf",
		September: "/i/Assets/pdf/kolayplan/2009/09_2009.pdf",
		October: "/i/Assets/pdf/kolayplan/2009/10_2009.pdf",
		November: "/i/Assets/pdf/kolayplan/2009/11_2009.pdf",
		December: "/i/Assets/pdf/kolayplan/2009/12_2009.pdf"
	},
	"y2010" : {
		January: "/i/Assets/pdf/kolayplan/2010/01_2010.pdf",
		February: "/i/Assets/pdf/kolayplan/2010/02_2010.pdf",
		March: "/i/Assets/pdf/kolayplan/2010/03_2010.pdf",
		April: "/i/Assets/pdf/kolayplan/2010/04_2010.pdf",
		May: "/i/Assets/pdf/kolayplan/2010/05_2010.pdf",
		June: "/i/Assets/pdf/kolayplan/2010/06_2010.pdf",
		July: "/i/Assets/pdf/kolayplan/2010/07_2010.pdf",
		August: "/i/Assets/pdf/kolayplan/2010/08_2010.pdf",
		September: "/i/Assets/pdf/kolayplan/2010/09_2010.pdf",
		October: "/i/Assets/pdf/kolayplan/2010/10_2010.pdf",
		November: "/i/Assets/pdf/kolayplan/2010/11_2010.pdf",
		December: "/i/Assets/pdf/kolayplan/2010/12_2010.pdf"
},	
	"y2011" : {
		January: "/i/Assets/pdf/kolayplan/2011/31_2011.pdf",
		February: "/i/Assets/pdf/kolayplan/2011/02_2011.pdf",
		March: "/i/Assets/pdf/kolayplan/2011/03_2011.pdf",
		April: "/i/Assets/pdf/kolayplan/2011/30-04-2011.pdf",
		May: "/i/Assets/pdf/kolayplan/2011/31_05_2011.pdf",
		June: "/i/Assets/pdf/kolayplan/2011/30_06_11.pdf",
		July: "/i/Assets/pdf/kolayplan/2011/31-07-11.pdf",
		August: "/i/Assets/pdf/kolayplan/2011/31-08-11.pdf",
		September: "/i/Assets/pdf/kolayplan/2011/30_09_11.pdf",
		October: "/i/Assets/pdf/kolayplan/2011/31_10_11_kolay_plan.pdf",
		November: "/i/Assets/pdf/kolayplan/2011/30_11_11kolayplan.pdf",
		December: "/i/Assets/pdf/kolayplan/2011/31_12_11kolayplan.pdf"
	}	
};

function replaceMonth(mnth){
	if(mnth == "January"){month = "Ocak"}
	else if(mnth == "February"){month = "Þubat"}
	else if(mnth == "March"){month = "Mart"}
	else if(mnth == "April"){month = "Nisan"}
	else if(mnth == "May"){month = "Mayýs"}
	else if(mnth == "June"){month = "Haziran"}
	else if(mnth == "July"){month = "Temmuz"}
	else if(mnth == "August"){month = "Aðustos"}
	else if(mnth == "September"){month = "Eylül"}
	else if(mnth == "October"){month = "Ekim"}
	else if(mnth == "November"){month = "Kasým"}
	else if(mnth == "December"){month = "Aralýk"}
	return month;
}
function advPlay(video,headline,info,innerInfo){
	var splash = '<div id="splash"></div>';
	$("body").append(splash);
	$("#splash").css({background: '#000000', opacity: '0.6'});
	if($.browser.msie && $.browser.version == "6.0"){
		$("#splash").css("height", $(document).height());
	}
	$("#splash").css("height", $(document).height());
	var flashplayer = '<div id="advplayer"></div>';
	$(".inner").append(flashplayer);
	var flashvars = {};
	var params = {wmode: "window", scale: "showall", allowScriptAccess: "always", allowFullScreen: "true"};
	var attributes = {id: "videoplayer"};
	swfobject.embedSWF("/i/Assets/swf/VideoPlayer.swf?path=http://www.avivasa.com.tr/i/Assets/videos/" + video + "&text=" + headline + "&info=" + info + "&innerInfo=" + innerInfo + "", "advplayer", "635", "384", "9.0.0","expressInstall.swf", flashvars, params, attributes);
	return false;
}
function splashClose(){
	var flashplayer = '<div id="advplayer"></div>';
	$(".inner").append(flashplayer);
	$("#splash").detach();
	$("#videoplayer").detach();
}
function closeVideo(){
	var flashplayer = '<div id="advplayer"></div>';
	$(".inner").append(flashplayer);
	$("#splash").detach();
	$("#videoplayer").detach();
}
$("#splash").live("click", function(){
	splashClose();
});



function Show(id)
 {
   for (var i=1;i<=5;i++)
    {
      if (i!=id)
        {
          $("#div"+i).style.display='none';
        }
      else
        {
          $("#div"+i).style.display='block';
        }
     }
	 return false;
 }
  
  
  
/*
var flashvars = {};
var params = {wmode: "transparent", loop: "true"};
var attributes = {id: "sound"};
var SoundStatus =  getCookie('sounds');
swfobject.embedSWF("i/Assets/swf/Mp3Player.swf?soundURL=/i/Assets/music.mp3&PlayerStatus="+ SoundStatus, "sound", "16", "16", "8.0.0", false, flashvars, params, attributes);
 */

 
 
 
 
 
 
 
 /*Acenta Listeleme*/
 
 
 Array.prototype.sortStr = function(dizi) {
        x="0123456789AaBbCcÇçDdEeFfGgÐðHhIýÝiJjKkLlMmNnOoÖöPpQqRrSsÞþTtUuÜüVvWwXxYyZz";
        function checkWord(w1,w2)
        {
            var frk,i=0;
            
            while(i<w1.length)
            {
                if(i<w2.length)
                {
                    frk=x.indexOf(w1.charAt(i))-x.indexOf(w2.charAt(i));
                    if(frk>0)
                    return 1;
                    else
                        if(frk<0) return -1;
                }
                i++;
            }
            if(w1==w2)return 0;
            return w1.length>w2.length?1:-1;
        }
        function Sort(A, iLo, iHi) {
            var Lo, Hi, Mid, T;
            Lo = iLo;
            Hi = iHi;
            Mid = A[Math.round((Lo + Hi) / 2)];

            do {
                while (checkWord(A[Lo] , Mid)==-1)
                    Lo++;
                while (checkWord(A[Hi] , Mid)==1)
                    Hi--;
                if (Lo <= Hi) {
                    T = A[Lo];
                    A[Lo] = A[Hi];
                    A[Hi] = T;
                    Lo++;
                    Hi--;
                }
            } while (Lo <= Hi);
            if (Hi > iLo)
                A = Sort(A, iLo, Hi);
            if (Lo < iHi)
                A = Sort(A, Lo, iHi);
            return A;
        }
        return Sort(this, 0, this.length-1);
    }
function initCities(){
	var size = cities.length;
	for(i=1; i<size; i++){
		$("select#po_city").append('<option value="'+cities[i]+'">'+cities[i]+'</option>');
		$("select#po_city").removeAttr("disabled");
		//$("#po_loading").hide();
		
	}
}

function getStore(city, county){
	var size = storeData.length - 1;
	$.each(storeData, function(key, item){
		if(item.bayi_il == city){
			if($.inArray(item.bayi_ilce, countyArr) == -1){
				countyArr.push(item.bayi_ilce);
			}	
		}
		if(key == size){
			countyArr.sortStr();
			initCounty();
		}
	});
	if(county == 0){
	
	}else{
	
	}
}
function getPo(city, county){
	var TableHtmlContent = "";

	var size = storeData.length - 1;
	$.each(storeData, function(key, item){
		if(item.bayi_il == city && item.bayi_ilce == county){
			if($.inArray(item.bayi_unvan, item.bayi_il, item.bayi_ilce, item.bayi_adres, item.bayi_tel, item.bayi_fax, item.bayi_email, address) == -1){
				TableHtmlContent += "<table>";
				TableHtmlContent += "<tr class=dif><td><h3 class=title>"+item.bayi_unvan+"</h3></td></tr>";
				TableHtmlContent += "<tr><td>"+item.bayi_adres+"</td></tr>";
				TableHtmlContent += "<tr class=dif><td>"+item.bayi_ilce+ 	" - " +item.bayi_il+"</td></tr>";
				TableHtmlContent += "<tr><td>Tel:"+item.bayi_tel+"</td></tr>";
				TableHtmlContent += "<tr class=dif><td>Faks:"+item.bayi_fax+"</td></tr>";
			}
		}	
	});
	var TableHtmlFooter = "</table>";
	TableHtml =  TableHtmlContent + TableHtmlFooter;
	$("#poItems").html("");
	$("#poItems").append(TableHtml);

}


function initCounty(){
	var size = countyArr.length;
	var limit = countyArr.length - 1;
	//console.log(size);
	for(i=0; i<size; i++){
		$("select#po_county").append('<option value="'+countyArr[i]+'">'+countyArr[i]+'</option>');
		//console.log(i);
		if(i == limit){
			
			$("select#po_county").removeAttr("disabled");
			//$("#po_loading").hide();
		}
	}
}

var storeData = [];
var cities = [];
var countyArr = [];
var address = [];

$(document).ready(function(){
	
	
	$.ajax({
		type: "post",
		url: "/bayiler_json",
		contentType: "application/json; charset=utf-8",
		beforeSend: function(){
			$("#po_loading").show();
		},
		success: function(response){
				$("#po_loading").hide();
				storeData = eval(response);
				var content = "";
				var size = storeData.length - 1;
				$.each(storeData, function(key, item){
					
					if($.inArray(item.bayi_il, cities) == -1){
						cities.push(item.bayi_il);
					}
					
					if(key == size){
						cities.sortStr();
						initCities();
					}
				});
		}
	});
	
	$("select#po_city").change(function(){
		countyArr.length = "";
		$("select#po_county").html("");
		var city = $(this).val();
		if(city != 0){
			getStore($(this).val(), 0);
		}
	});
	
	$("#poSend").click(function(){
		var poCity = $("#po_city option:selected").val();
		var poTown = $("#po_county option:selected").val();
		getPo(poCity,poTown);
		return false;
	});
	
});
 
