function buildCal(m, y, cM, cH, cDW, cD, brdr){
var mn=['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran','Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'];
var dim=[31,0,31,30,31,30,31,31,30,31,30,31];

var oD = new Date(y, m-1, 1); //DD replaced line to fix date bug when current day is 31st
oD.od=oD.getDay()+1; //DD replaced line to fix date bug when current day is 31st

var todaydate=new Date() //DD added
var scanfortoday=(y==todaydate.getFullYear() && m==todaydate.getMonth()+1)? todaydate.getDate() : 0 //DD added

dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYear()%400==0))?29:28;
var t='<div class="'+cM+'"><table class="'+cM+'" cols="7" cellpadding="0" border="'+brdr+'" cellspacing="0"><tr align="center">';
t+='<td colspan="7" align="center" class="'+cH+'">'+mn[m-1]+' - '+y+'</td></tr><tr align="center">';
for(s=0;s<7;s++)t+='<td class="'+cDW+'">'+"PPSÇPCC".substr(s,1)+'</td>';
t+='</tr><tr align="center">';
for(i=1;i<=42;i++){
var x=((i-oD.od>=0)&&(i-oD.od<dim[m-1]))? i-oD.od+1 : '&nbsp;';
if (x==scanfortoday) //DD added
x='<span id="today">'+x+'</span>' //DD added
t+='<td class="'+cD+'">'+x+'</td>';
if(((i)%7==0)&&(i<36))t+='</tr><tr align="center">';
}
return t+='</tr></table></div>';
}


function OpenPopup(url){
var pop;

	pop = window.open(url , 'PopUpWindow','width=385,height=228,left=198,top=250');

}
function OpenPopup(url,width,height){
var pop;

	pop = window.open(url, 'PopUpWindow','statusbar=no ,scrollbars=no,width=' + width + ',height='+ height +',left=188,top=170');

}

function OpenPopup1(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=no,width=' + width + ',height='+ height +',left=258,top=188');

}
function OpenPopup2(url,width,height,name){
var pop;

	pop = window.open(url , name,'scrollbars=no,width=' + width + ',height='+ height +',left=258,top=168');

}
function OpenPopup3(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=no,width=' + width + ',height='+ height +',left=188,top=170');

}
function OpenPopup4(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=yes,width=' + width + ',height='+ height +',left=188,top=170');

}
function OpenPopup5(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=yes,width=' + width + ',height='+ height +',left=30,top=195');

}

function OpenPopup6(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=yes,width=' + width + ',height='+ height +',left=0,top=0');

}

function OpenPopup7(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=yes,toolbar=yes,width=' + width + ',height='+ height +',left=188,top=170');

}

function OpenPopup8(url,width,height,name){
var pop;

	pop = window.open(url , name,'statusbar=no,scrollbars=no,toolbar=no,width=' + width + ',height='+ height +',left=50,top=50');

}
var popUp; 

function check(){
if (navigator.userAgent.indexOf("Opera")!=-1
		 && document.getElementById) type="OP"; 
if (document.all) type="IE"; 
//For Netscape version 4 :
if (document.layers) type="NN"; 
//Mozila e.g. Netscape 6 upwards
if (!document.all && document.getElementById) type="MO"; 
return type;
}
function AddFavorites(){
	window.external.AddFavorite('http://www.istanbuleah.gov.tr','İ.E.A.H. Web Sitesi');
}
function SetMyHome(){
	this.style.behavior='url(#default#homepage)';
	this.setHomePage('http://www.istanbuleah.gov.tr');
}
//sample check()
//type=check();
//if (type=="IE")