// 1. Cufon Replace start
Cufon.replace('.weblinks h2, .cntsh h3, .vws, .ttab ul li, .teaserbigtop h2, .teaserbig li h2, .teaserbig .dt p.mmelinks, .mmelinks, .tstrip h2');
//Cufon.replace('.header ul li.menu');
Cufon.replace('.header ul li.menu', 
    { color: '#333333', 
        hover:{color:'#fb2836'}
    }
);

Cufon.replace('.header ul li.menuactive', { color: '#fb2836' });


 
function ApplyCufon(){           
    Cufon('.weblinks li a.item',{color: '#454545'});             
    Cufon('.weblinks li a.itemactive',{color: '#fb2836'}); 
    Cufon('.weblinks li a.itemhover',{color: '#fb2836'});                        
    } 
    ApplyCufon();
            
    var counterItemCount = 36;

function shcnt(index){
 
//popitem
		for(i=1; i<=counterItemCount; i++){
			var obj = document.getElementById("cnt"+i);
			if( obj != null){
				obj.className = "cntsh";
			}
		}
		document.getElementById("cnt"+index).className = "cntsh active";



        
		for(i=1; i<=counterItemCount; i++){
			var obj = document.getElementById("menulink"+i);
			if( obj != null){
			    if(index != i){
				    obj.className = "item";
				}else{
				    obj.className = "itemactive";
				}
			}
		}
		
		setTimeout("ApplyCufon()",10); 
		
    }
    
    function cnthover(index){
        
		for(i=1; i<=counterItemCount; i++){
			var obj = document.getElementById("menulink"+i);
			if(!( obj == null || obj.className=="itemactive")){
			    if(index != i){
				    obj.className = "item";
				}else{
				    obj.className = "itemhover";
				}
			}
		}
		
		setTimeout("ApplyCufon()",10);
    }
    
    function cnthoverout(index){        
		for(i=1; i<=counterItemCount; i++){
			var obj = document.getElementById("menulink"+i);
			if(!( obj == null || obj.className!="itemhover")){			     
				    obj.className = "item";				 
			}
		}
		
		setTimeout("ApplyCufon()",10);
    }
// Cufon Replace end

// 2. Country div show hide start
//function shcnt1231(currIndex)
 //   {
//		var divCount = 36;
//		for(i=1; i<divCount; i++){
//			var obj = document.getElementById("cnt"+i);
//			if( obj != null){
//				obj.className = "cntsh";
//			}
//		}
//		document.getElementById("cnt"+currIndex).className = "cntsh active";
 //   }
// Country div show hide end

// 3. Set active class onclick start
function activelinks(obj) {
   var linkList = document.getElementById("footer").getElementsByTagName("a");
   for (i = 0; i < linkList.length; i++) {
      linkList[i].className = "";
   }
   obj.className = "active";
}
// Set active class onclick end

// 4. webform show hide start

function toggleDisplay() {
	
	if(document.getElementById("toggleMe").style.visibility == "visible" ) {
		document.getElementById("toggleMe").style.visibility = "hidden";
		
	}
	else {
		document.getElementById("toggleMe").style.visibility = "visible";
		CSBfleXcroll('divScrollable1')
		
	}
	
}

function toggleDisplay1() {
	
	 
		document.getElementById("toggleMe").style.visibility = "visible";
		CSBfleXcroll('divScrollable1')
	 
}
// webform show hide end


//----------------------------------------

 

// 5. Form show start

x = 0;
y = 0;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	if (obj.style.visibility == 'visible') {
	
	    if(document.getElementById('divScrollable1_vscrollerbase')){
	        document.getElementById('divScrollable1_vscrollerbase').style.display = "";
	    }

	    if (document.getElementById('fform')) {
	        document.getElementById('fform').style.display = "";
	    }
	    
	    CSBfleXcroll('divScrollable1');
	    //document.getElementById('divScrollable1').style.zIndex = 200;
	} else {
	if (document.getElementById('divScrollable1_vscrollerbase')) {
	    document.getElementById('divScrollable1_vscrollerbase').style.display = "none";
	}
	if (document.getElementById('fform')) {
	    document.getElementById('fform').style.display = "none";
	}
	
	}
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if(obj){
	    if (document.documentElement)
	    {
		    theLeft = document.documentElement.scrollLeft;
		    theTop = document.documentElement.scrollTop;
	    }
	    else if (document.body)
	    {
		    theLeft = document.body.scrollLeft;
		    theTop = document.body.scrollTop;
	    }
	    theLeft += x;
	    theTop += y;
	    obj.style.left = theLeft + 'px' ;
	    obj.style.top = theTop + 'px' ;
	    setTimeout("placeIt('fform')",500);
	    CSBfleXcroll('divScrollable1');
	}
}
//window.onscroll = function(){setTimeout("placeIt('fform')",500);};


// 5. Form show end
