function getBrowser() {
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) return 'Opera';
	if (agt.indexOf("staroffice") != -1) return 'Star Office';
	if (agt.indexOf("webtv") != -1) return 'WebTV';
	if (agt.indexOf("beonex") != -1) return 'Beonex';
	if (agt.indexOf("chimera") != -1) return 'Chimera';
	if (agt.indexOf("netpositive") != -1) return 'NetPositive';
	if (agt.indexOf("phoenix") != -1) return 'Phoenix';
	if (agt.indexOf("firefox") != -1) return 'Firefox';
	if (agt.indexOf("safari") != -1) return 'Safari';
	if (agt.indexOf("skipstone") != -1) return 'SkipStone';
	if (agt.indexOf("msie") != -1) return 'Internet Explorer';
	if (agt.indexOf("netscape") != -1) return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
	if (agt.indexOf('\/') != -1) {
		if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
			return navigator.userAgent.substr(0,agt.indexOf('\/'));
		}
		else {
			return 'Netscape';
		}
	} 
	else {
		if (agt.indexOf(' ') != -1){
			return navigator.userAgent.substr(0,agt.indexOf(' '));
		}
		else {
			return navigator.userAgent;
		}
	}
}

function principalAdjustHeight()
{
	ajustar('footer',575,0);//545,0
}

function ajustar(contentsId,elementOffset,styleOffset) {
  var isIE5=navigator.userAgent.toUpperCase().indexOf("MSIE 5")!=-1;
  if (document.getElementById) {
      var targetElement=document.getElementById(contentsId), documentHeight, totalOffset;

      if (targetElement && document.documentElement.offsetHeight
          && targetElement.offsetHeight) {
          documentHeight=document.documentElement.offsetHeight;
          if (targetElement.offsetHeight<documentHeight-elementOffset) {
              if (isIE5)
                  totalOffset=elementOffset;
                  else totalOffset=elementOffset+styleOffset;
              targetElement.style.height=String(documentHeight-totalOffset)+'px';
          }
      }
  }
}


var bannerMessages;
var bannerMaxLength=75;

function TypingBanner(idField, messages){
	bannerMessages = messages;
	StartTyping(0, 0, idField, "");
}

function StartTyping(CharacterPos, MsgIndex, idField, MsgBuffer) { 
	if (CharacterPos != bannerMessages[MsgIndex].length){
		if (CharacterPos<bannerMaxLength){
			MsgBuffer = MsgBuffer + bannerMessages[MsgIndex].charAt(CharacterPos);
			document.getElementById(idField).innerHTML = MsgBuffer;
	     	delay = 50; 
		}else{
			if (bannerMessages[MsgIndex].charAt(CharacterPos)!=' '){
				MsgBuffer = MsgBuffer + bannerMessages[MsgIndex].charAt(CharacterPos);
				document.getElementById(idField).innerHTML = MsgBuffer;
		     	delay = 50; 
			}else{
				MsgBuffer = MsgBuffer + " ...";
				document.getElementById(idField).innerHTML = MsgBuffer;
		     	delay = 1000; 
		       	MsgBuffer = "";
		     	CharacterPos=-1 ;
				if (MsgIndex!=bannerMessages.length-1){ 
		     	 	MsgIndex++ ;
				} 
				else {MsgIndex=0;}		
			}
		}	
	} 	
    else { 
    	delay = 1000; 
       	MsgBuffer = "";
     	CharacterPos=-1 ;
		if (MsgIndex!=bannerMessages.length-1){ 
     	 	MsgIndex++ ;
		} 
		else {MsgIndex=0;} 
    } 
	CharacterPos++;
	setTimeout("StartTyping('"+CharacterPos+"','"+MsgIndex+"','"+idField+"','"+MsgBuffer+"')",delay) 
} 

var ScrollMsg= "Welcome to webgimmicks.com ........"
var CharacterPosition=0;
 var spacer = "...    ";
function StartScrolling() {
	document.msgtest.welcome.value=ScrollMsg.substring(CharacterPosition,ScrollMsg.length)+
	
	ScrollMsg.substring(0, CharacterPosition);
	CharacterPosition++;
	if(CharacterPosition > ScrollMsg.length) CharacterPosition=0;
	// Set a Timer to call StartScrolling() at an interval
	window.setTimeout("StartScrolling()",150);
}