      var d = document;

      function $(id){
	       return d.getElementById(id);
      }
      
      function hideShow(id) {
	      if (d.getElementById(id)) {
		  	d.getElementById(id).style.display = (d.getElementById(id).style.display == '') ? 'none' : '';
		  }
      }


      function hide(id) {
	      if(document.getElementById(id)) document.getElementById(id).style.display = 'none';
      }
      
      function show(id) {
      //alert(id);
	      if(document.getElementById(id)) document.getElementById(id).style.display = 'block';
      }
      
      function swap(id, id2) {
      	if(document.getElementById(id).style.display=='none'){
          document.getElementById(id2).innerHTML='-';
          show(id);
      	}
      	else{
          document.getElementById(id2).innerHTML='+';
      	  hide(id)
      	}
      }
      
      function selectTab (newTabId, oldTabId, selTabNum){
      //alert(newTabId, oldTabId);
        newTab = document.getElementById(newTabId);
        newTab.className += " sel"; 
        if (oldTabId) {
          oldTab = document.getElementById(oldTabId);
         // oldTab.className = oldTab.className.substring(0,oldTab.className.length-3); // Класа за селектване на таб е .sel
          oldTab.className = oldTab.className.substring(0,oldTab.className.length-4); // Класа за селектване на таб е .sel
          hideShow (oldTabId+'child');
        }
        hideShow (newTabId+'child');
        
        switch(selTabNum) {
          case 1:
            selTab1 = newTabId;
            break;    
          case 2:
            selTab2 = newTabId;
            break;
          case 3:
            selTab3 = newTabId;
            break;
          case 4:
            selTab4 = newTabId;
            break;
          case 5:
            selTab5 = newTabId;
            break;
          case 6:
            selTab6 = newTabId;
            break;
          case 7:
            selTab7 = newTabId;
            break;
          case 8:
            selTab8 = newTabId;
            break;
          case 9:
            selTab9 = newTabId;
            break;
          default:
          case 10:
            selTab10 = newTabId;
            break;
        }
      }
      
      var step=20;
      
      function scrollIt(action)
      {//alert(selTab5);
        if( (action != null) || (action == 0) )
        {
        	tid=setTimeout(function () {
        			document.getElementById(selTab5 + 'child').scrollTop  += step*action;
        			scrollIt(action);
        		}
        		, 100);
        }
        else
        {
        	clearTimeout(tid);
        }
      }

	  function scrollItF1(action, id, stepSlideParam)
      {
		if (stepSlideParam != null || stepSlideParam != 0) var stepSlide = stepSlideParam;
		
		if( (action != null) || (action == 0) )
        {
			tid = setTimeout (
					function () {
	        			document.getElementById(id).scrollLeft += stepSlide*action;
	        			scrollItF1(action, id, stepSlide);
        			}
        		, 100 );
        }
        else
        {
        	clearTimeout(tid);
        }
      }

      function scrollCalendar(action)
      {//alert(selTab6);
        if((action != null) || (action == 0))
        {
        	tid = setTimeout(function () {
            document.getElementById(selTab6 + 'tab').scrollTop  += step*action; 
            scrollCalendar(action);
          }, 100);
        }
        else
        {
        	clearTimeout(tid);
        }
      }
      
      function scrollStatistics(action)
      {
        if( (action != null) || (action == 0) )
        {
        	tid=setTimeout(function () {
        			document.getElementById(selTab3 + 'child').scrollTop  += step*action;
        			scrollStatistics(action);
        		}
        		, 100);
        }
        else
        {
        	clearTimeout(tid);
        }
      }
      
      function resizeIframeToFitContent() {
  			if(navigator.userAgent.indexOf('Firefox') > -1) top.document.getElementById('live_frame').height = 418;     //FF
  			else if(navigator.userAgent.indexOf('Opera') > -1) top.document.getElementById('live_frame').height = 425;     //OP
        else top.document.getElementById('live_frame').height = 408;   // IE  
      }
      
      function getObj(id){
        var obj=false;
        if(document.getElementById(id)) obj=document.getElementById(id);
        return obj
      }
      
      function getIntFromId (selObj){                                       
              num = parseInt(selObj.substring(1,selObj.length));            
              return num;                                                   
      }                                                               
                                                                            
      function getTabId(type, newsCount){  // type is 'prev' or 'next'
              numId = getIntFromId(selTab4);                                
              if (type == 'next') {                                         
                if (numId < newsCount) numId += 1;                          
                else  numId = 1;                                            
              } else if (type == 'prev') {                                  
                if (numId > 1) numId -= 1;                                  
                else numId = newsCount;                                     
              } else numId = 1;                                             
              objId = 'n' + numId;                            // id in "n1".."n3"
              return objId;                                                 
      }           
      
      function getPageId(seltab, type, pagesCount){  // type is 'prev' or 'next'; selTab is current selected tab(page)
              //numId = getIntFromId(selTab);
              numId = parseInt(seltab.substring(3,seltab.length));
           //   alert('numbID = '+numId+' and seltab is: '+seltab);
              if (type == 'next') {                                         
                if (numId < pagesCount) numId += 1;                          
                else  numId = 1;                                            
              } else if (type == 'prev') {                                  
                if (numId > 1) numId -= 1;                                  
                else numId = pagesCount;                                     
              } else numId = 1;                                             
              objId = seltab.substring(0,3) + numId;
              return objId;                                                 
      }
      
      // Loads the appropriate category on change action! It uses AJAX and calls method ListArticles 
      // in ajax.js, which lists all articles for the given catId.
      function loadCatFirstPage(selId)
      {
        var cat = document.getElementById(selId).value;
        ListArticles(1);
      }
      
      function loadCalendarFirstPage(selId) 
      {
        var cat = document.getElementById(selId).value;
        ListCalendarEvents(cat);
      }
      
      function loadCat(selId) {
        var cat = document.getElementById(selId).value;
        var yearIndex = document.getElementById('year').selectedIndex;
        var year = document.getElementById('year')[yearIndex].value;
        ListAccents(1, cat, year);
        /*var pattern = /&cid=/;
        var pattern1 = /&oid=/;
        var pattern2 = /&year=/;
        var pattern3 = /#here/;
        var str3 = new Array();
        var parent = document.getElementById('parent');
        var href = window.location.href;
        var cat = $(selId).value;
        
        if(href.match(pattern3))
        {
          var str4 = href.split(pattern3);
          window.location.href = str4[0] +  '&cid='+ cat;
        }
       
        if(!href.match(pattern))
        {
          var str1 = href.split(pattern1);
          if (cat == 0)
          {
            window.location.href = str1[0] + '&oid='+ parent.value;
          }
          else
          {
            window.location.href += '&cid='+ cat; 
          }
      	}
      	else 
      	{
          var str = href.split(pattern);
          var str2 = href.split(pattern2);

          if (cat == 0)
          {
            window.location.href = str[0];
          }
          else
          { 
            if (str2[1] != null)
            {
              str3 = str2[1].split(pattern);
            }
            
            if (str[1] != null)
            {
              if ((str3[0] != null) && (str3[1] == null))
              {
                window.location.href = str[0] + '&cid='+ cat + '&year='+ str3[0];
              }
              else
              {
                window.location.href = str[0] + '&cid='+ cat;
              }
            }
            else
            {
              window.location.href = str[0] + '&cid='+ cat;
            }
          }
        }*/
      }
      
      function loadCalendarCat(selId) {
        var pattern = /&catid=/;
        var pattern1 = /&year=/;
        var pattern2 = /&page=/;
        var href = window.location.href;
        var cat = document.getElementById(selId).value;

        if(!href.match(pattern))
        {
          var str2 = href.split(pattern2);
          if(str2[1] != null)
          {
            window.location.href = str2[0] + '&catid='+ cat ;
          }
          else
          {
            window.location.href += '&catid='+ cat;
          }
      	}
      	else 
      	{
          var str = href.split(pattern);
          var str2 = str[0].split(pattern2);
          if (cat == 0)
          {
            var str1 = str[1].split(pattern1);
            if(str1[1] != null)
            {
              window.location.href = str[0] + '&year='+ str1[1];
            }
            else
            {
              window.location.href = str2[0];
            }
          }
          else
          {
            var str1 = str[1].split(pattern1);
            if(str1[1] != null)
            {
              window.location.href = str[0] + '&catid='+ cat + '&year='+ str1[1];
            }
            else
            {
              window.location.href = str2[0] + '&catid='+ cat;
            }
          }
        }
      }
      
      function LoadGalleryCat (selId)
      {
        var pattern = /&cid=/;
        var pattern1 = /&catid=/;
        var href = window.location.href;
        var cat = document.getElementById(selId).value;

        if(!href.match(pattern))
        {
          window.location.href += '&cid='+ cat;
        }
        else
        {
          var str = href.split(pattern);
          
          if (cat == 0)
          {
            window.location.href = str[0];
          }
          else
          {
            window.location.href = str[0] + '&cid='+ cat;
          }
        }
      }
      
      function loadYear(selId) {
        var year = document.getElementById(selId).value;
        var cidIndex = document.getElementById('cid').selectedIndex;
        var cat = document.getElementById('cid')[cidIndex].value;
        ListAccents(1, cat, year);
      }
      
      function loadYearCalendar(selId) {
        var pattern = /&year=/;
        var pattern1 = /&catid=/;
        var pattern2 = /&page=/;
        var pattern3 = /&cid=/;
        var href = window.location.href;
        
        var cat = document.getElementById(selId).value;
        
          if(!href.match(pattern))
          {
            var str2 = href.split(pattern2);
            if(str2[1] != null)
            {
              window.location.href = str2[0] + '&year='+ cat ;
            }
            else
            {
              window.location.href += '&year='+ cat; 
            }
        	}
        	else 
        	{
            var str = href.split(pattern);
            var str2 = str[0].split(pattern2);
            
            if (cat == 0)
            {
              var str1 = str[1].split(pattern1);
              
              if(str1[1] != null)
              {
                window.location.href = str[0] + '&catid='+ str1[1];
              }
              else
              {
                window.location.href = str2[0];
              }
            }
            else
            {
              var str1 = str[1].split(pattern1);
              var str3 = str[1].split(pattern3);
              if(str1[1] != null)
              {
                window.location.href = str[0] + '&year='+ cat + '&catid='+ str1[1];
              }
              else if(str3[1] != null)
              {
                window.location.href = str[0] + '&year='+ cat + '&cid='+ str3[1];
              }
              else
              {
                window.location.href = str2[0] + '&year='+ cat;
              }
            }
          }
      }
      
      function submitform()
      {       
        document.frm.submit();
      }

      function isAlphaNumeric(str)
      {
        var re = /[^а-яА-Я0-9 ]/g
        if (re.test(str)) return false;
        return true;
      }
      
      function validateFormInput()
      {      
        var lname = document.frm.lname.value;
        if (isAlphaNumeric(lname))
        {  
          return true;
        }
        else
        {
          alert("Моля, въведете валиден текст на кирилица!");
          document.frm.lname.value = '';
          document.frm.lname.focus();
          return false;
        }
      }
      
      function handleEnter (field, event) {

        if (event && event.which == 13)
        {
          if (!validateFormInput())
          {
            return false;
          }

        }
        else
        {
          
          return true;
        }
      }  
      
/*  function make_darker(state){
       var ex=$('make_darker');
       if (state==1&&ex)
       {$('make_darker').style.display="block";}
       else if (state==-1&&ex){
       $('make_darker').style.display="none";}
        }
    */
  function make_darker(state){
    var ex=d.getElementById('make_darker');
    var b=d.getElementById('subnav');
    if (state==1&&ex)
    {
      d.getElementById('make_darker').style.display="block";                        
      var navlinks = b.getElementsByTagName( 'a' );
      
      for( var i = 0; i < navlinks.length; i++ )
      {
        if(navlinks[i].className=='sel')
        {}
        else
        {
          navlinks[i].style.color='#454545';
        }                         
      }
     
    }
    else if (state==-1&&ex)
    {
      d.getElementById('make_darker').style.display="none";                               
      var navlinks = b.getElementsByTagName( 'a' );
      for( var i = 0; i < navlinks.length; i++ )
      {
        if(navlinks[i].className=='sel')
        {}
        else
        {
          navlinks[i].style.color='';
        }                        
      }
	  if (pattern != 10529) {
	  	d.getElementById('subnav').style.background = "url('i/submenu.gif')";
	  }
    }
  }

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.sportni.bg?tid=20&oid=2610" class="lavst">АНГЛИЯ</a>'
menu1[1]='<a href="http://www.sportni.bg?tid=20&oid=2609" class="lger">ГЕРМАНИЯ</a>'
menu1[2]='<a href="http://www.sportni.bg?tid=20&oid=2607" class="lger">ИСПАНИЯ</a>'
menu1[3]='<a href="http://www.sportni.bg?tid=20&oid=2608" class="lger">ИТАЛИЯ</a>'
menu1[4]='<a href="http://www.sportni.bg?tid=20&oid=2611" class="lger">ФРАНЦИЯ</a>'
menu1[5]='<a href="http://www.sportni.bg?tid=20&oid=11235" class="lger">БЪЛГАРИ В ЧУЖБИНА</a>'
menu1[6]='<a href="http://www.sportni.bg?tid=20&oid=2613" class="lger">АРХИВ ШАМПИОНСКА ЛИГА</a>'
menu1[7]='<a href="http://www.sportni.bg?tid=20&oid=2635" class="lger">ЛИГА ЕВРОПА</a>'
menu1[8]='<a href="http://www.sportni.bg/euro2008" class="lger" target="_blank">ЕВРО 2008</a>'
menu1[9]='<a href="http://www.sportni.bg?tid=20&oid=11230" class="lger">МОНДИАЛ 2010</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://www.sportni.bg?tid=20&oid=2625" class="lavst">МОТОРНИ</a>'
menu2[2]='<a href="http://www.sportni.bg?tid=20&oid=82" class="lger">ВОЛЕЙБОЛ</a>'
menu2[3]='<a href="http://www.sportni.bg?tid=20&oid=41" class="lger">БАСКЕТБОЛ</a>'
menu2[4]='<a href="http://www.sportni.bg?tid=20&oid=2629" class="lger">ТЕНИС</a>'
menu2[5]='<a href="http://www.sportni.bg?tid=20&oid=623" class="lger">ЛЕКА АТЛЕТИКА</a>'
menu2[6]='<a href="http://www.sportni.bg?tid=20&oid=622" class="lger">ЗИМНИ СПОРТОВЕ</a>'
menu2[7]='<a href="http://www.sportni.bg/olimpiada2008/" class="lger" target="_blank">ПЕКИН 2008</a>'
//menu2[7]='<a href="http://www.sportni.bg?tid=20&oid=8341" class="lger">М-ТЕЛ МАСТЪРС</a>'


//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="http://www.sportni.bg?tid=20&oid=4304" class="lavst">БЕРОЕ</a>'
menu3[1]='<a href="http://www.sportni.bg?tid=20&oid=4770" class="lger">БОТЕВ</a>'
menu3[2]='<a href="http://www.sportni.bg?tid=20&oid=4302" class="lger">ЛЕВСКИ</a>'
menu3[3]='<a href="http://www.sportni.bg?tid=20&oid=4301" class="lger">ЛИТЕКС</a>'
menu3[4]='<a href="http://www.sportni.bg?tid=20&oid=10380" class="lger">ЛОКО МЗ</a>'
menu3[5]='<a href="http://www.sportni.bg?tid=20&oid=4300" class="lger">ЛОКО ПД</a>'
menu3[6]='<a href="http://www.sportni.bg?tid=20&oid=4299" class="lger">ЛОКО СФ</a>'
menu3[7]='<a href="http://www.sportni.bg?tid=20&oid=10400" class="lger">МИНЬОР</a>'
menu3[8]='<a href="http://www.sportni.bg?tid=20&oid=11237" class="lger">МОНТАНА</a>'
menu3[9]='<a href="http://www.sportni.bg?tid=20&oid=4772" class="lger">ПИРИН</a>'
menu3[10]='<a href="http://www.sportni.bg?tid=20&oid=4293" class="lger">СЛАВИЯ</a>'
menu3[11]='<a href="http://www.sportni.bg?tid=20&oid=10420" class="lger">СЛИВЕН</a>'
menu3[12]='<a href="http://www.sportni.bg?tid=20&oid=11252" class="lger">СПОРТИСТ</a>'
menu3[13]='<a href="http://www.sportni.bg?tid=20&oid=4291" class="lger">ЦСКА</a>'
menu3[14]='<a href="http://www.sportni.bg?tid=20&oid=4290" class="lger">Ч.МОРЕ</a>'
menu3[15]='<a href="http://www.sportni.bg?tid=20&oid=8380" class="lger">ЧЕРНОМОРЕЦ</a>'

//Contents for menu 4 - formula 1
var menu4=new Array()
menu4[0]='<a href="http://sportni.bg/?tid=20&oid=11238" class="lavst">ПИСТИ</a>'
menu4[1]='<a href="http://sportni.bg/?tid=20&oid=11239" class="lger">ПИЛОТИ</a>'
menu4[2]='<a href="http://sportni.bg/?tid=20&oid=11241" class="lger">ОТБОРИ</a>'
menu4[3]='<a href="http://sportni.bg/?tid=20&oid=11240" class="lger">ИСТОРИЯ</a>'

var menuwidth='165px' //default menu width
var menubgcolor='#f9f9f9'  //menu bgcolor
var disappeardelay=0  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

var t1;
var tclass;
var tclass2;
var pic1;
var cl;

//   Change class
function changeClass(eID,eClass){
  if(eID) t1 = eID;
  if(eClass) tclass = eClass;
  document.getElementById(t1).className = tclass;
}

function changeBack(eID,beClass){
  if(eID) menubgcolor = eID;
  if(beClass) tbclass = beClass;
  document.getElementById(menubgcolor).className = tbclass;
}


function changebg(eID,pic) {
   if(eID) t1 = eID;
   if(pic) pic1 = pic;
  document.getElementById(t1).style.background = "url('"+pic1+"')";
}

function changecolor(eID,fcolor) {
   if(eID) t1 = eID;
   if(fcolor) cl = fcolor;
  document.getElementById(t1).style.background = cl;
}



/////No further editting needed

function hidetab(eID,which_class){
  if(eID) t1 = eID;
   if(which_class) tclass2 = which_class;
  document.getElementById(t1).className = tclass2;
}


var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="make_darker(1);clearhidemenu();changeClass(t1,tclass);" onMouseout="make_darker(-1);dynamichide(event);hidetab(t1,tclass2)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-480px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu2(obj, e, menucontents, menuwidth, menucolor, posx){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
if (menucolor) { document.getElementById("dropmenudiv").style.background = menucolor; }
if (posx) { document.getElementById("dropmenudiv").style.marginLeft = posx+"px"; }
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function searchQuery(){
	var base_url = 'index.phtml?tid=20&oid=11209';
	
	if(document.getElementById('searchtext').value != '') base_url += '&q='+encodeURI(document.getElementById('searchtext').value);
	if(document.getElementById('fromdate').value != '') base_url += '&f='+document.getElementById('fromdate').value;
	if(document.getElementById('todate').value != '') base_url += '&d='+document.getElementById('todate').value;
	if(document.getElementById('category').value != 0) base_url += '&c='+document.getElementById('category').value;
	
	if(document.getElementById('fulltext').checked) base_url += '&a=on';
		
	window.location.href = base_url;
}

function stripURL()
{
  var base_url = 'index.phtml?tid=20&oid=11209';
  //if($('q').value != '') base_url += '&q='+$('q').value;
  if(document.getElementById('searchtext').value != '') base_url += '&q='+encodeURI(document.getElementById('searchtext').value);
  if(document.getElementById('fromdate').value != '') base_url += '&f='+document.getElementById('fromdate').value;
  if(document.getElementById('todate').value != '') base_url += '&d='+document.getElementById('todate').value;
  if(document.getElementById('category').value != 0) base_url += '&c='+document.getElementById('category').value;
  
  if(document.getElementById('fulltext').checked)
  {
  	base_url += '&a=on';
  }
  else
  {
  	base_url += '';
  }
  
  window.location.href = base_url;
}
function reloadBanner(){
	
	document.getElementById('banner_300x250').src = 'banner_right.html';
}
