var     TObject=function(t){

        var     obj=document.createElement(t);
        
                obj.parent=null;
                obj.addBody=function(){
                
                        document.body.appendChild(obj);

                }

                obj.destroy=function(){
                    obj.parentNode.removeChild(obj);
                }

                obj.free=function(){
                        obj.destroy();
                }

                obj.absolute=function(){
                    obj.style.position='absolute';
                }

                obj.relative=function(){
                    obj.style.position='relative';
                }

                obj.displayBlock=function(){
                    obj.style.display='block';
                }

                obj.displayNone=function(){
                    obj.style.display='none';
                }

                obj.showObject=function(){
                    obj.style.visibility='visible';
                }

                obj.hideObject=function(){
                    obj.style.visibility='hidden';
                }

                obj.addEvent=function(t,f){

                    if(obj.addEventListener){

                        obj.addEventListener(t,f,false);

                    }
                    else if(obj.attachEvent){
                        obj.attachEvent('on'+t,f);
                    }
                 

                }

                obj.setColor=function(c){
                        obj.style.color=c;
                }

                obj.setBgColor=function(c){
                        obj.style.backgroundColor=c;

                }

                obj.addEl=function(el){
                    obj.appendChild(el);
                }

                

                var upTimer,downTimer;
                var artis=1;
                var h=-1;
                obj.clipTop=function(){

                    clearTimeout(downTimer);


                    if(h<obj.offsetHeight){
                    
                     
                       h+=parseInt(artis,10)

                       obj.style.clip='Rect('+h+','+obj.offsetWidth+','+obj.offsetHeight+',0)';


                        obj.style.top=obj.offsetTop-artis;

                        upTimer=setTimeout(
                            obj.clipTop,
                            10
                        )
                    }
                }

                obj.clipRestore=function(){

                    clearTimeout(upTimer);

                    if(h>-1){

                        obj.style.clip='Rect('+h+','+obj.offsetWidth+','+obj.offsetHeight+',0)';
                        obj.style.top=obj.offsetTop+artis;
                        downTimer=setTimeout(
                            obj.clipRestore,
                            5
                        )
                        h-=parseInt(artis,10)

                
                    }

                   

                }
                obj.clipAll=function(){
                     obj.style.clip='Rect('+obj.offsetHeight+','+obj.offsetWidth+','+obj.offsetHeight+',0)'; 
                     h=obj.offsetHeight;
                     obj.style.top=-1*obj.offsetHeight+obj.offsetTop;
                }
                
                
return obj;
}

var     TButton=function(){

var         b=new TObject('input');
        
            b.type='button';
    
	        b.setBgColor('CACAFF');
           
            b.setValue=function(v){
                    b.value=v;
                }
    
return b;
}

var     TButtonSec=function(){
        
        
        var     b=new TObject('div');
            
       
        
        b.setValue=function(v){
            b.innerHTML=v;
        }
        
        b.style.fontFamily='arial';
        b.style.fontSize='11px';
        b.selectedValue=[];
        b.style.backgroundImage='url(images/calendarHeader.gif)';
        b.style.border='1px solid black';
        b.style.color='white';
        b.style.fontWeight='bold';
   
        
            b.ondblclick=function(){
                b.parentNode.style.visibility='hidden';
                
                m=document.getElementById('mif');
                ayrintiEkle();
                for(i=0;i<6;i++){
                    m.rows[m.rows.length-1].cells[i].innerHTML=b.selectedValue[i];
                    m.rows[m.rows.length-1].cells[i].style.width=30;
                } 
                             
                //document.getElementById('sayi').value=(b.selectedValue[0]+ "|"+b.selectedValue[1]+ "|" +b.selectedValue[2]+ "|"+b.selectedValue[3]+ "|"+b.selectedValue[4]+ "|"+b.selectedValue[5]) 
             
            }
        
        b.onmouseover=function(){
        b.style.backgroundImage='url(images/panel.gif)';
        b.style.border='1px solid black';
        
        
        }
        
        
        b.onmouseout=function(){
              b.style.backgroundImage='url(images/calendarHeader.gif)';
        b.style.border='1px solid black';
       
        
        }
   
    
    
return b;
}


var     TLighterButton=function(){

var     lb=new TButton();
    
        var i=0;
        var timerDown,timerUp;

        lb.opacityDown=function(){

        }
        
        lb.opacityUp=function(){
                  
        }

        lb.addEvent('mouseover',

            function(){
                    clearTimeout(timerUp);
                    lb.opacityUp();
            }
        );

        
        lb.addEvent('mouseout',

                function(){
                    clearTimeout(timerDown);
                    lb.opacityDown();
                    
                }
        );

       
 return lb;   
}

var     TEdit=function(){


        var     e=new TObject('input');
                e.type='text';
                e.style.border='1px solid black';

return e;
}

var     THiddenEdit=function(){
            var     m=new TEdit();
        return m;
}

var     TNumberEdit=function(){
    
        var     ne=new TEdit();
                ne.value='';
       
                ne.addBody();
              
               
    


                ne.numKey=function(e){
                var key=(typeof event!='undefined')?event.keyCode:e.which;
         
                 if(key!=8){
                        if((key<47)||(key>57)){

                            if(e.keyCode){
                             e.cancelBubble = true;
                             e.returnValue = false;

                            ne.setBgColor('ADBCEF');
                           

                          
                            }
                         
                            else{
                            e.preventDefault();
                            ne.setBgColor('ADBCEF');
                          
                            }
                            
                         

                        }
                        else
                        {

                            ne.setBgColor('EAEAEA');
                          
                        }
                 }
               }

		ne.restore=function(){
			ne.setBgColor('white');
			
		}
              
                ne.addEvent('keypress',ne.numKey);
		ne.addEvent('keyup',ne.restore);

return ne;
}

var     TTcKimlikEdit=function(){

            var tc=new TNumberEdit();
            
             
              tc.checkLength=function(e){
                 var key=(typeof event!='undefined')?window.event.keyCode:e.which;
           
                 
                 if(key!=8){
                    if(tc.value.length>10){
                       if(e.keyCode){
                    e.returnValue=0;
                    alert('EN FAZLA 11 KARAKTER GİREBİLİRSİNİZ')
                       }
                     else if(e.which){
                      e.preventDefault();
               
                     }
                        

                      
                    else
                    {
                    
                 
                        event.keyCode=0;
                    }
                    }
                  }
              }

              tc.onclick=function(){


              }
              
              tc.cikis=function(e){
                  var key=(typeof event!='undefined')?window.event.keyCode:e.which;
                  if(tc.value.length<11){
              
  
                      
                  }
              }

            tc.addEvent('keyup',tc.checkLength);
            tc.addEvent('keypress',tc.checkLength);
     
        
return tc;
}

var     TMarqueeItem=function(msg){


    var     a=new TObject('td');
     
            a.innerHTML=msg;


            a.setBgColor('EACEEA')

    return a;
}

var     TMarqueeFrameItem=function(){
        var     f=new TObject('iframe');
                f.frameBorder=0;
                f.style.width='100%';
                f.style.height='100%';
               	f.onkeydown=function(){
			if(event.keyCode==8){
		
			event.returnValue=0;
			event.cancelBubble=false;
		}
		
		f.onkeyup=function(){
		if(event.keyCode==8){
		event.returnValue=0;
		event.cancelBubble=false;
	}
}
}
               

                var d;

               f.deneme=function(){
           
   
        }
               
                   

    return f;
}

var     TMarquee=function(){
    var     buton=TObject('input');
            buton.type='button';
            buton.absolute();
            buton.style.left=700;
            buton.addBody();
            buton.onclick=function(){
                f.deneme();

            }


    var     m=new TObject('marquee');
            m.style.border='1px solid black'
            m.addBody();
            m.absolute();

    var     yedekDiv=TObject('div');

    var     xhttp=new TRequestObject(yedekDiv);

            yedekDiv.displayNone();

   

    var     ul=new TTable();
            m.appendChild(ul);
            ul.displayNone();
            m.style.height=0;
        
            m.style.width=200;
            m.style.top=250
            ul.style.width=m.offsetWidth-2;

         
            m.addOtherLink=function(){
            
                yedekDiv.innerHTML=xhttp.responseText;
              
                el=yedekDiv.getElementsByTagName('a');
                uzunluk=el.length;

                    for (i = 0; i < uzunluk; i++) {
                            m.addLink(el[i].innerHTML)

                    }
                         

                ul.displayBlock();
               
            }



            m.addLink=function(msg){
              var  r=new TMarqueeItem(msg);
                ul.addRow().addCell(r);
        
              
            }
            m.direction='up';
            m.scrollAmount=2;
            var timerAc;
            m.stop();
      
            m.load=function(){
                if(m.offsetHeight<=300){
                m.style.height=m.offsetHeight+10;
                m.style.top=m.offsetTop-5;
                timerAc=setTimeout(m.load,20);
                }else{
                    ul.displayBlock();
                }

            }
            m.onmouseover=function(){
                m.stop();
            }

            m.onmouseout=function(){
                m.start();
            }

            m.writeLink=function(){
                m.innerHTML=yedekDiv.innerHTML;
                

                ul.displayBlock();

            }
                var     f=new TMarqueeFrameItem();
            m.addFrame=function(){
            
                        f.src="duyurular.htm";
                        m.appendChild(f);
                 
                     
                        f.style.left=-10;
            }


            m.setWH=function(w,h){
                m.style.width=w;
                m.style.height=h;
                f.style.width=m.offsetWidth-40;
                f.style.height=m.offsetHeight-40;

            }

    

            m.addFrame();

return m;
}

var     TRequestObject= function() {


// AJAX Nesnesi olarak kullanacağımız değişkenin başlangıç değeri
var xmlDoc = null;


try
{
	xmlDoc = new XMLHttpRequest();
         if (xmlDoc.overrideMimeType) {
                xmlDoc.overrideMimeType('text/xml');
         }

	
}
catch(e)
{
                var MicrosoftObjects = ["MSXML2.XMLHttp.5.0",
                                        "MSXML2.XMLHttp.4.0",
                                        "MSXML2.XMLHttp.3.0",
                                        "MSXML2.XMLHttp",
                                        "Microsoft.XMLHttp"];
                

for (var i = 0; i <= MicrosoftObjects.length; i++){
                        if (!MicrosoftObjects[i]) { break; }
                            try
                            {
                                var xmlDoc = new ActiveXObject(MicrosoftObjects);
                                alert(MicrosoftObjects[i]);
                            } catch(e)
                                      {

                                        //Hata kodu yazılacak;
                                      }
                }
}



return xmlDoc;

      }

var     TTable=function(){

    var     t=new TObject('table');
    var     tb=new TObject('tbody');
            t.appendChild(tb);
            var row=null;
            t.addRow=function(){

            row=new TObject('tr');
                    tb.appendChild(row);

                    row.addCell=function(cell){
                        row.appendChild(cell);
                    return cell;
                    }

                    row.addCells=function(){
                        var     c=new TObject('td');

                    row.appendChild(c);
                    return c;
                    }
                    
                    
                    row.ondblclick=function(){
                  m=document.getElementById('mif');
                ayrintiEkle();
                for(i=0;i<6;i++){
                    m.rows[m.rows.length-1].cells[i].innerHTML=this.cells[i].innerHTML;
                } 
                      

                    }
               row.kaydet=function(){
                var m=document.getElementById('mif');
               var dizi=new Array();
               var hk=new Array();
               var e1=new Array();
               var e2=new Array();
               var e3=new Array();
               var e4=new Array();
               var aciklama=new Array();
               
                    for(i=0;i<m.rows.length;i++){
                    
                        for(a=0;a<m.rows[i].cells.length;a++){
                                hk[i]=m.rows[i].cells[a].innerHTML;        
                        }
                    }
               
               
            
                return dizi;
               }
                    
    

            return row;
    }

    t.addCell=function(){
        var c=new TObject('td');
        row.appendChild(c);
        return c;
    }
    
    

    return t;
}

var     TResmiGazete=function(){
var     cerceve=new TObject('div');
        cerceve.style.border='1px solid black';
var     panel=new TObject('div');
        panel.style.border='1px solid black';
	panel.className='buton';
cerceve.absolute();

var     lfark,tfark;
        
var     frame=new TMarqueeFrameItem();
	frame.unselectable='on';
   //        frame.src='http://rega.basbakanlik.gov.tr/eskiler/'+yil+'/'+ay+'/'+yil+ay+gun+'.htm'

var     x,y;
var basili=false;



        panel.onmousedown=function(e){


          var olay = document.all ? window.event : e;
          x=document.all ? olay.x : olay.clientX ;
          y=document.all ? olay.y : olay.clientY ;
        
         
         lfark=x-panel.offsetLeft;
         tfark=y-panel.offsetTop;

         basili=true;
                   

          
        }

        panel.onmouseup=function(){


            basili=false;

        }





	frame.onkeydown=function(){
            	if(event.keyCode==8){

		event.returnValue=0;
		event.cancelBubble=false;
                }
        }

     
    var gun,ay,yil;


var     edit=new TDateEdit();
     
var     rg=new TObject('div');
        cerceve.appendChild(frame);
        
	
	rg.onkeydown=function(){

     
	}

	rg.ignoreKey=function(){
                var olay = document.all ? window.event : e;
                tus = document.all ? olay.keyCode : olay.which;

                if(tus==8) {
		if(document.all) { olay.returnValue = false; } else { olay.preventDefault(); olay.stopPropagation(); }
                }

            

            }

         rg.onmousemove=function(e){

            var olay = document.all ? window.event : e;

                            if(basili){
                            x=document.all ? olay.x : olay.clientX ;
                            y=document.all ? olay.y : olay.clientY ;



                  


            }

        }


        
	
        rg.newPage=function(page){
            frame.src=page;

        }

        rg.moveWindows=function(){

        myer=x;
	nyer=panel.offsetLeft;

	x=myer-tfark;
	y=y-tfark;

                rg.style.left=x-lfark;
                rg.style.top=y+12;
        }

        rg.hideObject();
        rg.style.border='0px solid black';
               rg.absolute();
                frame.style.top=20;
                rg.style.width=700;
                rg.style.height=400

                var     geri=new TButton();

                        rg.appendChild(panel);
                        rg.appendChild(cerceve);
                        cerceve.absolute();
                        cerceve.style.top=60;
                        cerceve.style.width='100%'

                        panel.appendChild(geri);
                        panel.appendChild(edit);
                        panel.absolute();
                        panel.style.backgroundColor='red';

                        edit.absolute();
                        edit.style.left=60;
                        geri.absolute();
                        geri.style.left=9;
                        geri.style.top=9;
			geri.style.border='1px solid black';
                        edit.style.top=9;
                        geri.value='Geri'
              var       git=new TButton();
                        panel.appendChild(git);
                        git.value='Git';
                        git.absolute();
			git.style.border='1px solid black';


                git.onclick=function(){
                var     tarih=edit.date();
               rg.setDate();
                }


                rg.setDate=function(){

                var     tarih=edit.date();
                gun=tarih.substring(0,2);
                ay=tarih.substring(3,5);
                yil=tarih.substring(6,10)

                frame.src='http://rega.basbakanlik.gov.tr/eskiler/'+yil+'/'+ay+'/'+yil+ay+gun+'.htm'

                }

                        geri.onclick=function(){



                        frame.src=frame.src;


                           
                }
		var	kapat=new TButton();
			panel.appendChild(kapat);
			kapat.style.border='1px solid black';
			kapat.value='X';
                        
			kapat.onclick=function(){
	
			rg.destroy();
			}
                        kapat.absolute();
                rg.setWH=function(){

			cerceve.setBgColor('white');
                    
			panel.setBgColor('blue');
			panel.style.width='100%';
			panel.style.height=60;
                        kapat.style.left=cerceve.offsetWidth-24;
			kapat.style.height=20;
			kapat.style.width=20;
			kapat.style.top=panel.offsetTop+2;
			
			if(window.addEventListener){
			edit.style.height=18;
			}else{
			edit.style.height=22;

			}
			
			edit.style.top=panel.offsetTop+2;
			edit.style.left=45;
			edit.setBgColor='white';
		
			git.style.width=40;
	
			git.style.left=118;
			git.style.top=panel.offsetTop+2;

			geri.style.width=40;
			geri.style.left=2;
			geri.style.top=panel.offsetTop+2;
                        cerceve.style.top=27;
                        rg.setDate();
                         frame.src='http://rega.basbakanlik.gov.tr/eskiler/'+yil+'/'+ay+'/'+yil+ay+gun+'.htm'

                        rg.showObject();
    
                }

            
               rg.tarihAl=function(){
                
                

               }

		
               
		cerceve.style.height=400;                   
    		
                rg.setWH();

return rg;
}

var     TDateEdit=function(){
    var     dis=new TObject('div');

var 	cizgi=new TObject('div');
	dis.appendChild(cizgi);
		


    var     gunedit=new TNumberEdit();
            dis.appendChild(gunedit);
            
            gunedit.onblur=function(){
                if(gunedit.value.length<2){
                    gunedit.value='0'+gunedit.value;
                }
            }
            gunedit.style.border='0px'
            gunedit.onkeyup=function(){
                
                if(gunedit.value.length>2){
                    ayedit.focus();
                }
            }
             var tempedit=new THiddenEdit();

            dis.selectEdit=function(){
                
                tempedit=this;

            }

            dis.dayControl=function(){



           }

      
    var     ayedit=new TNumberEdit();
           
            dis.appendChild(ayedit);
            ayedit.onblur=function(){
                if(ayedit.value.length<2){
                    ayedit.value='0'+ayedit.value;
                }
            }

	    ayedit.onkeyup=function(){

		if(ayedit.value.length>2){
			yiledit.focus();
                }
	    }
	
    var oldText;
	   
	    ayedit.onfocus=function(){
		
	    }

	

            ayedit.style.border='0px'
    var     yiledit=new TNumberEdit();
            dis.appendChild(yiledit);
            yiledit.onblur=function(){
                    
                    if(yiledit.value.length<4){
                        yiledit.value=2000+ parseInt(yiledit.value,10);
                    }
                    
            }
		


            yiledit.style.border='1px'
            ayedit.absolute();
            yiledit.absolute();
            gunedit.absolute();
	    dis.absolute();
            cizgi.absolute();
            dis.setPos=function(){
                gunedit.relative();
                ayedit.relative();
                yiledit.relative();

		cizgi.style.borderBottom='1px solid black';
		cizgi.style.top=0;
                cizgi.innerHTML='&nbsp;'
                cizgi.style.fontSize=9;
                cizgi.style.left=2;
                dis.style.fontSize=9;
                dis.style.height=17;
                cizgi.style.width=68;
		gunedit.maxLength=2;
		ayedit.maxLength=2;		
		yiledit.maxLength=4;
		dis.style.border='1px solid black';
		
		dis.style.width=72;
                gunedit.style.width=17;
                gunedit.style.left=2;
                ayedit.style.width=17;
		
                ayedit.style.left=gunedit.offsetLeft+gunedit.offsetWidth+4;
                ayedit.style.top=2;
                gunedit.style.top=2;
                yiledit.style.top=2;
                yiledit.style.width=30;
                yiledit.style.left=ayedit.offsetLeft+ayedit.offsetWidth+6;

                gunedit.style.fontSize=11;
                ayedit.style.fontSize=11;
                yiledit.style.fontSize=11;
                gunedit.style.height=14;
                ayedit.style.height=14;
                yiledit.style.height=14;

                        dis.style.height=19;
			
			dis.setBgColor('white');

                

            }

	dis.date=function(){
		return gunedit.value+'.'+ayedit.value+'.'+yiledit.value;
	}
	
	dis.ay=function(ay){
		
		if(ay<10){
			ay='0'+ay;
		}
		if(ay>12){
			ay=12;
		}
	
		ayedit.value=ay;
	}
	
	dis.gun=function(gun){
		if(gun<10){
			gun='0'+gun;
		}

		if(gun>31){
			gun=31;
		}

		gunedit.value=gun;
	}

	dis.yil=function(yil){

		if(yil<100){
				yiledit.value=2000+parseInt(yil,10);
		}

		yiledit.value=yil;
	}


        gunedit.addEvent('keyup',dis.dayControl);
        ayedit.addEvent('keyup',dis.dayControl);
        
        gunedit.addEvent('focus',dis.selectEdit);
        ayedit.addEvent('focus',dis.selectEdit);
        yiledit.addEvent('focus',dis.selectEdit);
        
        dis.setToday=function(){
        var     today=new Date();
        day=today.getDate();
        month=today.getMonth()+1;
        year=today.getFullYear();
        dis.gun(day);
        dis.ay(month);
        dis.yil(year);
        }


        dis.setPos();
        dis.setToday();


    
    return dis;
	
}

var     TRequestXML=function(){
  var       xmlDocs=new TObject('a');



  var       xmlDoc=new TRequestObject();

       
           
            xmlDocs.xmlDocument=null;

            xmlDocs.url=null;

            xmlDoc.onreadystatechange=function(){
                if ( xmlDoc.readyState != 4 ) return ;
                            xmlDocs.xmlDocument=xmlDoc.responseText;
        
            }

            xmlDoc.onload=function(){
                if ( xmlDoc.readyState != 4 ) return ;
                            xmlDocs.xmlDocument=xmlDoc.responseText;
        
            }
                 

       xmlDocs.openXML=function(sonuc){
           

                xmlDoc.open( 'GET', xmlDocs.url , true);
                xmlDoc.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
                xmlDoc.setRequestHeader("Pragma", "no-cache");
                xmlDoc.setRequestHeader("Expires", "Wed, 31 Dec 1980 00:00:00 GMT");
                xmlDoc.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
                xmlDoc.setRequestHeader("Content-length", 0);
                xmlDoc.setRequestHeader("Connection", "close");
                xmlDoc.xmlDocument=sonuc;
                xmlDoc.send(null);
        }
      


return xmlDocs;
}

var     TAltinKaynak=function(){
        var     e=new TObject('div');

                var     d=new TRequestXML();
                        d.url="http://xml.altinkaynak.com.tr/doviz.xml"
                        d.openXML();
                       
          

                       
                        len=d.xmlDocument.getElementsByTagName("ALIS").length;
                        
                        e.addBody();
                        e.absolute();
                        e.setBgColor('white')

                        var     t=new TTable();
                                t.style.width=200;
                        for (i = 1; i < len; i++) {

                        var c=new TObject('td');
                        var r=new t.addRow();
                            if(i%2==0){
                                r.style.width=200;
                                r.setBgColor('AEAEAE')
                            }else{r.setBgColor('EAEAEA')}
                            t.addCell().innerHTML=d.xmlDocument.getElementsByTagName("ADI")[i].childNodes[0].nodeValue;
                            t.addCell().innerHTML=d.xmlDocument.getElementsByTagName("ALIS")[i].childNodes[0].nodeValue;
                            t.addCell().innerHTML=d.xmlDocument.getElementsByTagName("SATIS")[i].childNodes[0].nodeValue;
                            }
                        

                        e.appendChild(t);
  return e;
}

var     TCalendarHeader=function(){

        var     h=new TTable();
                    h.absolute();
                    h.style.fontSize=9;
                
                    h.style.border='0px solid black';
                    h.cellSpacing=1;

            var     r=h.addRow();
                    r.style.backgroundImage='url(img/calendarheader.gif)';
            var    days=new TUtils().days;

            
            for (var n in days) {
                var cell=r.addCells()
                cell.innerHTML=days[n];
                cell.style.position='relative';
                cell.style.border='1px solid black';
                cell.style.width=17;
                cell.style.fontFamily='arial'
                cell.align='center'
            }

return h;
}

var     TCalendarDaysPanel=function(){
    var     t=new TTable();
            t.style.fontSize=9;
            t.cellSpacing=1;
            t.absolute();

            t.gun=null;
            t.obj=null;
            var s=0;
            for(i=0;i<6;i++){
                    var r=t.addRow();
                        r.style.backgroundImage='url(img/panel.gif)'
                    for (a = 0; a < 7; a++) {
                            var cell=r.addCells();

                           cell.onclick=function(){
                           deger=this.innerHTML;
                           if(isFinite(deger)){
                                t.gun=parseInt(deger,10);
                           }
                   }

                            cell.style.cursor='default'
                            cell.innerHTML=s;
                            cell.style.border='1px solid black';
                            cell.style.width=17;
                            cell.style.fontFamily='arial'
                            cell.style.height=16;
                            cell.align='center'
                            s++;
                    }

            }



    return t;
}

var     TCalendar=function(){


    var     c=new TObject('div');
            c.absolute();
//günün tarihini al
var     tarih=new Date();
            c.gun=tarih.getDay();
            c.ay=tarih.getUTCMonth()+1;
            c.yil=tarih.getFullYear();
            //ayın 1 i hangi güne denk geliyor onu bul
            var     ilkgun= new Date(c.ay+"/01/"+c.yil)
                    ilkgun=ilkgun.getUTCDay();
                    
//takvimi temizleyen fonksiyon
            c.clear=function(){

                var cells=daytable.getElementsByTagName('td');
                for (var i in cells) {
                    cells[i].innerHTML='&nbsp;';
                }

            }
//takvimin içini yeniden dolduran fonksiyon
            c.writeCalendar=function(){
                c.clear();
                 var cells=daytable.getElementsByTagName('td');
                var gun=1;
                for(i=ilkgun;i<(ilkgun+31);i++){
                    cells[i].innerHTML=gun;
                gun++
                }

            }

//Haftanın günleri
            var     header=new TCalendarHeader();
            c.addEl(header);
            header.style.height=17;
            header.style.top=22;
            c.style.top=30;

            var     daytable=new TCalendarDaysPanel();
            c.addEl(daytable);
            daytable.style.top=37;
            c.addBody();
            c.setBgColor('gray')
            c.style.width=daytable.offsetWidth+30;
            c.style.height=160;
            c.writeCalendar();
            //c.clipAll();
            //c.clipRestore();
            var     close=TButton();
                    c.addEl(close);
                    close.absolute();
                    close.style.width=20;
                    close.value='X';
                    close.style.border='1px solid black'
                    close.style.left=header.offsetWidth-20;

                    close.onclick=function(){
                        c.clipTop();
                    }
            
            c.showCalendar=function(){
                c.displayBlock();
                
                
            }

            c.onclick=function(){
                    
            }

return c;
}

var     TUtils=function(){
var o= new Object();
        o.days=['Pzt','S','Ç','P','C','Ct','P'];
        o.months=   ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
                    'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'];
        o.monthsDays=[31,28,31,30,31,30,31,31,30,31,30,31];

        o.isLeapYear=function(date){
        
        var     leapyear=false;
            var m=new Date(date);
                day=m.getDay();
                month=m.getMonth()+1;
                year=m.getFullYear();

                if(month==2){
                    if(year%4==0){
                            leapyear=true
                    }
                }
        return leapyear;
       }



return o;
}

var     TDateTimePicker=function(){

var     container=new TObject('div');
 

        var     cal=new TCalendar();
        container.addEl(cal);
        var     dt=new TDateEdit();
        container.addEl(dt);
    
         

       

        var     b=new TButton();
        container.addEl(b);
       

        b.onclick=function(){
           cal.displayBlock();
           cal.clipRestore();
  
        }

   


        container.setPos=function(){
        container.absolute();
        dt.style.top=2;
        dt.style.left=2;
        dt.setPos();
        b.absolute();
        b.style.width=20
        b.style.color='white';
        b.style.border='1px solid black';
        b.style.left=dt.offsetWidth+2;
        b.style.top=2;
        b.style.height=dt.offsetHeight;
        b.value='...';
        
        cal.displayNone();
        cal.clipAll();
        cal.obj=dt;
        dt.gun(cal.gun);

        cal.style.top=container.offsetTop+container.offsetHeight+2;
        cal.style.left=container.offsetLeft-9;
  
        }

        container.addBody();
        container.setPos();
       
return container;
}


var     TListBox=function(){

        var     lb=new TTable();

        lb.addItem=function(s){
                lb.addRow().addCells().innerHTML=s;
             

        }

    return lb;
}

var     TListButton=function(){
        var       d=new TObject('div');
        var       l=new TObject('a');
        d.absolute();
        d.selectedValue=[];
        d.style.width=200;
        d.style.backgroundColor='AFACAD';
        d.appendChild(l);
        l.innerHTML='ADNAN';
                
       var      k=new TButton();
       k.absolute();
       k.style.border='1px solid black';
       k.style.backgroundColor='brown';
       k.style.color='white';
       k.value='X';
       k.style.height=16;
       k.style.width=16;
     
       d.addEl(k);
        d.initalize=function(){
          d.style.width=d.parentNode.offsetWidth;
          k.style.left=d.offsetWidth-20;
         
          d.style.left=d.parentNode.offsetLeft+10;
          d.style.border='1px solid black';
        }
        k.onclick=function(){
                d.parentNode.style.visibility='hidden';
        }
        
        
        k.onmouseover=function(){
                  k.style.backgroundColor='CCEADD';
        
        }
        
        k.onmouseout=function(){
        k.style.backgroundColor='green';
        }
        
        d.setValue=function(v){
            l.innerHTML=v;
        }
        
        

return d;
}




var         THiddenEdit=function(){

        var         he=new TObject('input');
                    he.type='text';
                    he.style.border='0px solid black';
                 	
                    
                
                
                    
return he;
}


var	TColumn=function(){
	var	col=new TObject('td');
	

return col;
}


var	TRow=function(){
	var	row=new TObject('tr');	
	
	row.addCell=function(t){
		var	c=new TCell();
		row.addEl(c);
		c.innerHTML=t;
		c.parent=row;
	}

return row;
}

var	TCell=function(){
	var	cell=new TObject('td');
		
return cell;
}

var	THeader=function(){
	var	header=new TObject('thead');
	var	r=new TRow();
	header.style.backgroundColor='silver';
	header.addTitle=function(t){
		
		header.addEl(r);
		var 	title=new TCell();
			title.innerHTML=t;
			title.style.border='2px outset blue';
			title.style.width=100;
		r.addEl(title);	
	}

return header;
}


var 	TBody=function(){
	var tb=new TObject('tbody');

return tb;
}

var 	TDBGrid=function(){
		
	var	grid=new TObject('table');	
	grid.cellSpacing=0;	
	
	grid.colCount=3;
	grid.rowCount=3;
	grid.columnTitles=['col','col','col','col'];	
	
	var	header=new THeader();
	grid.addEl(header);

	grid.addHeader=function(){
		for(i=0;i<grid.colCount;i++){
			header.addTitle(grid.columnTitles[i]);
		}
	}		
			
	var	tb=new TBody();
	grid.addEl(tb);

	grid.rowValues=[];

	grid.addRow=function(){

		var	r=new TRow();

		r.parent=tb;

		tb.addEl(r);

		for(i=0;i<grid.colCount;i++){

			r.addCell(grid.rowValues[i]);

		}		

	}


	
	
	
return 	grid;
}


var	TMarqueeControler=function(id){
	var	r=document.getElementById(id);



	r.onmouseover=function(){
		r.stop();
	}

	r.onmouseout=function(){
		r.start();	
	}

	r.scrollDelay=100;

	r.scrollAmount=2;
	r.direction='up';




		
return r;
}


var 	TChangeColorTD=function(cName){
	
	el=document.getElementsByTagName('div');
	elcount=el.length;

	for(i=0;i<elcount;i++){
	var	divel=el[i];
	
		if(divel.className==cName){

		divel.onmouseover=function(){
			this.style.color='aqua';
		}				

		divel.onmouseout=function(){
			this.style.color='0E3C54';
		}				


		}		
	}



}


var TScrollPane=function(id){
    id=document.getElementById(id);
    
    var speed=1;
    var timerUp,timerDown;
    id.acik=true;
    
    id.scrollFast=function(){
            clearTimeout(timerDown);
            id.speedyAmount();
   }
    
    id.scrollSlow=function(){
            clearTimeout(timerUp);
            id.scrollAmount=2;
            speed=1;
    }
    
    id.stopElement=function(){
                id.stop();

    }
    
    id.startElement=function(){
            id.start();

    }
    id.onmouseover=function(){
    if(id.acik)
            id.stopElement();
    }
    

    id.onmouseout=function(){
    if(id.acik)
        id.startElement();
    }
    
    id.down=function(){
    
        id.direction='down';
      
    }

    id.up=function(){
       
        id.direction='up';
       
    }

    id.speedyAmount=function(){
            if(speed<20){
                id.scrollAmount=speed;
                timerUp=setTimeout(id.speedyAmount,100);
                speed++;
            }
   }
   
    
    id.playPause=function(el){
    
            if(id.acik){
                el.src="Images/stop_marquee.png";
                id.stop();
                id.acik=false;
            }
            else{
         
                el.src="Images/pause_marquee.png";
                id.start();
                id.acik=true;
            }
    
    }

return id;
}


var TVergiHaftasiPanosu=function(){
	var r=document.getElementById('reklam');
	r.index=0;
	var pano=document.getElementById('pano');
	var tdlen=pano.getElementsByTagName('td').length;

	var uptimer;
	r.kaydir=function(){
		
		if(r.scrollTop%40!=39){
		
			r.scrollTop=r.scrollTop+1;
			uptimer=setTimeout(r.kaydir,20);
		}
		else{
			r.scrollTop++;
		}
		
	}
	
	r.start=function(){
		if(r.index<tdlen){
		r.kaydir();
	
		r.index++;
		}else{
		r.index=0;
		r.scrollTop=0;		
		}
			timer=setTimeout(r.start,8000);
	}
	
return r;
}

var TTransparentBackground=function(){
	var tp=new TObject('div');
		tp.style.top=0;
		tp.style.left=0;
		tp.style.backgroundColor='blue';	
		tp.style.width=document.body.clientWidth;
		tp.style.height=3000;
		

	
return tp;
}



var TFrame=function(){
var t=new TTransparentBackground();
t.absolute();
t.style.left=0;
t.style.top=0;
t.id='arkaplan';
t.addBody();

var 	dis=new TObject('div');
		dis.absolute();
		dis.addBody();


var 	buttonPanel=new TObject('div');
	
	dis.addEl(buttonPanel);
	var 	b=new TObject('input');
				b.type='button';
				b.value="Kapat";
				b.className='pencereOrta';
				b.style.color='white';
				buttonPanel.addEl(b);
				b.style.border='1px solid black';
				

				b.onclick=function(){
					frame.src="";
			
					document.body.removeChild(dis);
					document.body.removeChild(t);
				}
	

		var 	frame=new TObject('iframe');
				frame.style.border=0;
				frame.frameBorder=0;
				frame.scrolling='no';
				frame.style.top=23;
				dis.addEl(frame);
				frame.width=560;
				frame.height=420;	
	
	
	

				
			dis.setCenter=function(){
					dis.style.width=560;
					dis.style.height=420;	
					dis.style.left=(document.body.clientWidth/2)-(dis.offsetWidth/2);	
									dis.style.top=(document.body.clientHeight/2)-(dis.offsetHeight/2);	
			}	
			
			dis.setFolder=function(f){
				frame.src="vergihaftasigaleriler/"+ f +"/fs_aux.html"
			}

		dis.setCenter();

	
return dis;
}


var TFlashObject=function(){

	var 	o=new TObject('object');
			o.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";
			o.codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0";
			o.addBody();
			o.AllowScriptAccess="sameDomain";
			o.height=500;
			o.width=600;
			o.WMode='transparent';

			o.setMovie=function(m){
			o.Movie=m;
			
			}	
		
return o;
}



