function hoverout(el,txtclassnormal) {
   el.className=txtclassnormal;
}

function hoveron(el,txtclasshover) {
        el.className=txtclasshover;
}

function ready_jquery(){ 
  jQuery(document).ready(function() {  
         jQuery('.topnavkwicks').kwicks({
	       max: 150,
     	   spacing:0,
	       duration: 900,   
         easing: 'easeOutBounce'
	}); 
  });     
  
  
  
	
	// News-Latest-Ticker  BEGIN	   	
   interval = setInterval("removeFirst('news-latest-ul-tips')", pause);      
  // News-Latest-Ticker END
}

 // News-Latest-Ticker  BEGIN
var first = 0;
var speed = 3000;
var pause = 5500;
function removeFirst(id){               
	first = jQuery('ul#' + id + ' li:first').html();
  jQuery('ul#' + id + ' li:first').addClass('li-first-tracker news-latest-item-tips'); 	
	jQuery('ul#' + id + ' li:first')
	.animate({opacity: 0.9}, speed)
	.fadeOut('slow', function() {jQuery(this).remove();});
	addLast(first,id);
}
		
function addLast(first, id){
	last = '<li class="news-latest-item news-latest-item-tips" style="display:none">'+first+'</li>';
	jQuery('ul#' + id).append(last)
	jQuery('ul#' + id + ' li:last')
	.animate({opacity: 1}, speed)
	.fadeIn('slow')
}

  // News-Latest-Ticker END






function initlayer() {   
   var maxHeight  = 0 ;
   
   var divleft = new getObj('navleft');   
   var divcontent = new getObj('content');
  
   
   if(typeof divleft == 'object' || typeof divleft == 'function') {
     if(divleft.obj.offsetHeight>maxHeight) {
        maxHeight = divleft.obj.offsetHeight;
     }    
   }
   
   if(typeof divcontent == 'object' || typeof divcontent == 'function') {
      if(divcontent.obj.offsetHeight>maxHeight) {
        maxHeight = divcontent.obj.offsetHeight ;
     }
    }
   
   if(maxHeight > 0 ) {
      if(typeof divleft == 'object' || typeof divleft == 'function') {
        divcontent.style.height = maxHeight +  50 + 'px';
      }
      if(typeof divcontent == 'object' || typeof divcontent == 'function') {
        divleft.style.height = maxHeight + 50 + 'px';
      }
   }   
}

function initlayernews() {   
   var maxHeight  = 0 ;
  
   var divleft = new getObj('navleft');
   var divcenternews = new getObj('content-news');
   var divnews = new getObj('news-latest');
      
   if(typeof divleft == 'object' || typeof divleft == 'function') {
     if(divleft.obj.offsetHeight>maxHeight) {
        maxHeight = divleft.obj.offsetHeight;
     }
   }   
   
   if(typeof divcenternews == 'object' || typeof divcenternews == 'function') {
     if(divcenternews.obj.offsetHeight>maxHeight) {
        maxHeight = divcenternews.obj.offsetHeight;
     }    
   }  
   
   if(typeof divnews == 'object' || typeof divnews == 'function') {
     if(divnews.obj.offsetHeight>maxHeight) {
        maxHeight = divnews.obj.offsetHeight;
     }
   }
   if(maxHeight > 0 ) {
     if(typeof divleft == 'object' || typeof divleft == 'function') {
       divleft.style.height= maxHeight + 50 + 'px';
     }
     if(typeof divcenternews == 'object' || typeof divcenternews == 'function') {
       divcenternews.style.height= maxHeight + 50 + 'px';
     }
     if(typeof divnews == 'object' || typeof divnews == 'function') {
       divnews.style.height= maxHeight + 50 + 'px';
     }
   }
}

function showhover(element) {
   var imgHover = new getObj('h'+element.id);
   ind = element.style.top.indexOf('px');
   var imgtop = element.style.top.substring(0,ind);
   ind = element.style.left.indexOf('px');
   var imgleft = element.style.left.substring(0,ind);
   
   if(imgtop.substring(1,1)=='-') {
	imgtop = -1 * parseInt(imgtop);	
   }
   else {
	imgtop =  parseInt(imgtop);
   }
   
   imgHover.style.top= imgtop - 200 + 'px';
   imgHover.style.left=imgleft + 'px';
   imgHover.style.display='block';
}

function hidehover(element) {
  var imgHover = new getObj('h'+element.id);
  imgHover.style.display="none";
}

function getObj(name){
      if (document.getElementById)
      {
        this.obj = document.getElementById(name);        
        this.style = document.getElementById(name).style;
      }
      else if (document.all)
      {
        this.obj = document.all[name];
        this.style = document.all[name].style;
      }
      else if (document.layers)
      {
        this.obj = document.layers[name];
        this.style = document.layers[name];
      }
 }