function getE(objn) { return getElementById(objn); }
function getHTTPObjectUser() {
    var xmlhttp;
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {xmlhttp = new XMLHttpRequest();} catch (e) {xmlhttp = false;}
    }

    if(!xmlhttp && typeof ActiveXObject != "undefined"){
       try{ xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xmlhttp=false;}
       if(!xmlhttp)try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xmlhttp=false;}
    }
    return xmlhttp;
}
//seeta
jQuery(function( $ ){
    try {
        $(document).ready(function() {
			
			//google tracking
			var pathname = window.location.pathname;
			//alert(pathname);
			
			if(pathname != '/'){
				
				
				var str = pathname;
				str = str.split("/");
				
				//alert(str[2]);
				
				if(str[2].length == 2){
					var langu = str[2];
				}else{
					var langu = "";
				}
				
				  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		  
				  //use jQuery to call the Google Analytics JavaScript
				  $.getScript(gaJsHost + "google-analytics.com/ga.js", function(){
				  
					  //tell Analytics about the current page load using standard _trackPageview method
					  try {
						  var pageTracker = _gat._getTracker("UA-19213379-1");
						  pageTracker._trackPageview();
					  } catch(err) {}
					  
					  //loop though each anchor element
					  $('a').each(function(){
						  
						  var href = $(this).attr('href');
						  //if(href != "/"){
							  var filetypes = /\.(zip|exe|pdf|doc*|xls*|ppt*|mp3)$/i;
							  
							  //check for links starting with http or https, making sure that links to our own domain are excluded
							  if ((href.match(/^https?\:/i)) && (!href.match(document.domain))){
								  $(this).click(function() {
									  var extLink = href.replace(/^https?\:\/\//i, '');
									  pageTracker._trackEvent('External', 'Click - External link' + langu, extLink);
								  });
							  }
							  //check for links starting with mailto:
							  else if (href.match(/^mailto\:/i)){
								  $(this).click(function() {
									  var mailLink = href.replace(/^mailto\:/i, '');
									  pageTracker._trackEvent('Email', 'Click - Email' + langu, mailLink);
								  });
							  }
							  //check for links with file extension that match the filetypes regular expression:
							  else if (href.match(filetypes)){
								  $(this).click(function() {
									  var extension = (/[.]/.exec(href)) ? /[^.]+$/.exec(href) : undefined;
									  var filePath = href.replace(/^https?\:\/\/(www.)mydomain\.com\//i, '');
									  pageTracker._trackEvent('Download', 'Click - ' + extension + ' - ' +langu, filePath);
								  });
							  }
						  //}
			  
					  });
					  
				  });
			}
			
         	$(".nondocchklogin").hide(); 
			$(".linknondocchklogin").click(function() {
				$(".nondocchklogin").show(); 
				//$("#linknondocchklogin").hide();
			});
			
			$(".swchg").click(function() {
				$(".nondocchklogin").hide(); 
			});	
        });
    } catch(e) {}
});

