function setDay(theMonth,theYear){
	var monthDays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	theMonth = parseInt(theMonth);
	var daysInMonth = monthDays[theMonth-1];
   	if (theMonth == 2) { // February
		if (theYear%400==0 || (theYear%4 == 0 && theYear%100!=0) ){
	  		daysInMonth +=1;
		}
   }
   var selIndex = document.archive.theDay.selectedIndex;
   changeDayField(daysInMonth,selIndex);
}
function changeDayField(daysInMonth,selIndex){
	var o = document.archive.theDay;
	var option;
	for(var i=0;i<o.length;i++) o.options[i] = null;
	for(var i=0;i<daysInMonth;i++){
		option = new Option(i+1,i+1);
		o.options[i] = option;
	}
	if(selIndex<daysInMonth) o.options.selectedIndex = selIndex;
	else o.options.selectedIndex = 0;
}
function goArchive(currDay,currMonth,currYear){
	var theDay = parseInt(document.archive.theDay.value);
	var theMonth = parseInt(document.archive.theMonth.value);
	var theYear = parseInt(document.archive.theYear.value);
	if(theYear > parseInt(currYear)){
		alert("Lütfen geçerli bir tarih giriniz!");
		return false;
	}
	else if(theYear == parseInt(currYear) && theMonth > parseInt(currMonth)){
		alert("Lütfen geçerli bir tarih giriniz!");
		return false;
	}
	else if(theMonth == parseInt(currMonth) && theDay >= parseInt(currDay)){
		alert("Lütfen geçerli bir tarih giriniz!");
		return false;
	}
	if((theYear == 2002 && theMonth < 6) || (theYear == 2002 && theMonth == 6 && theDay < 21)){
		alert("Haberler 21 Haziran 2002 tarihinden itibaren arşivlenmeye başlamıştır!");
		return false;
	}
	else document.archive.submit();
}
function popup(url){
var yenipencere = null;
yenipencere=window.open('','yenipencere','width=550,height=500,status=no,toolbar=no,menubar=no,directories=no,location=no,scrollbars=yes,resizable=yes,alwaysRaised=yes,screenX=20,screenY=5,titlebar=yes,z-lock=yes,left=20,top=130');
if (yenipencere != null) {
if (yenipencere.opener == null){
yenipencere.opener = self;
} 
yenipencere.location.href=url;
yenipencere.focus();
}
}
function sendfriendpopup(url,param){
	var yenipencere = null;
	yenipencere=window.open('','yenipencere','width=360,height=477,status=no,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no,resizable=yes,alwaysRaised=yes,screenX=20,screenY=5,titlebar=yes,z-lock=yes,left=20,top=130');
	if(yenipencere != null){
		if(yenipencere.opener == null){
			yenipencere.opener = self;
		}
		if (param != null) { yenipencere.location.href=url+escape(param); }
		else { yenipencere.location.href=url }
		yenipencere.focus();
	}
}
function fins(theURL,winName,features){
	window.open(theURL,winName,features);
}
function vote(){
	if(self.document.MyForm.hcount.value == "true"){
	if(self.document.MyForm.hanswerindex.value!=null){
		if(self.document.MyForm.hanswerindex.value!=""){
			var voteWindow = null;
			voteWindow=window.open('','voteWindow','width=400,height=300,status=no,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no,resizable=yes,alwaysRaised=yes,screenX=400,screenY=350,titlebar=yes,z-lock=yes,left=350,top=250');
			if (voteWindow != null){
				if (voteWindow.opener == null){
				voteWindow.opener = self;
			}
				self.document.MyForm.hcount.value="false";
				voteWindow.location.href="http://anket.mynet.com/anket_user/anket/?hanswerindex=" + self.document.MyForm.hanswerindex.value + "&surveyname=" + self.document.MyForm.surveyname.value;
				voteWindow.focus();
			}
		}
		else{
			alert("Oy vereceginiz secenegi işaretleyiniz...");
		}
	}
	}else {
			alert("Lutfen sadece bir kez oy kullanınız..");
	}
}
function anket(url){
	var anket = null;	
	anket=window.open('','anket','width=400,height=300,status=no,toolbar=no,menubar=no,directories=no,location=no,scrollbars=no,resizable=yes,alwaysRaised=yes,screenX=400,screenY=350,titlebar=yes,z-lock=yes,left=350,top=250');
	anket.location.href=url;
	if(anket != null){
		if(anket.opener == null){
			anket.opener = self;
		}
	anket.location.href=url;
	anket.focus();
	}
}