
function cleanupHashCode() {
    try {
		var loginbox,dirtyText,cleanText,i;
		loginbox=getMultibrowserElementById('Uid');
		
		if (loginbox) {
			dirtyText=loginbox.value;
			//  alert('hey '+dirtyText);
			i = dirtyText.indexOf('@@');
			if(i>0){
				cleanText = dirtyText.substring(0,i);
				if(cleanText!=dirtyText && cleanText!='') {
					loginbox.value=cleanText;
				}
			}
		}
    }
    catch(e){}    
}

function XXcleanupHashCode() {
    try {
		var loginbox,dirtyText,cleanText,i;
		if (document.all.loginForm && document.all.loginForm.all.Uid) {
			loginbox=document.all.loginForm.all.Uid;
			dirtyText=loginbox.value;
			
			i = dirtyText.indexOf('@@');
			if(i>0){
				cleanText = dirtyText.substring(0,i);
				if(cleanText!=dirtyText && cleanText!='') {
					loginbox.value=cleanText;
				}
			}
		}
    }
    catch(e){}    
}

function register_cleanupHashCode() {
  var func = cleanupHashCode;
  register_onLoad(func);
}

// some ELS standard parts...:
// these functions are defined in each ELS script file - if changed, please replace also in other files

function getMultibrowserElementById(sID,oDoc) { 
    if( !oDoc ) { oDoc = document; } // init at document level, used for recursive for netscape
    if( document.layers ) { //Netscape layers
		//alert('document.layers');
        if( oDoc.layers[sID] ) { return oDoc.layers[sID]; } else {
            //repeatedly run through all child layers
            for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
                //on success, return that layer, else return nothing
                y = getMultibrowserElementById(sID,oDoc.layers[x].document); }
            return y; } }
    if( document.getElementById ) { //DOM; IE5, NS6, Mozilla, Opera
		//alert('document.getElementById');
        return document.getElementById(sID); }
    if( document.all ) { //Proprietary DOM; IE4
		//alert('document.all');
        return document.all[sID]; }
    if( document[sID] ) { //Netscape alternative
		//alert('document[xxx]');
        return document[sID]; }
    return false;
}

function register_onLoad(func) {
  var oldonload = window.onload;  
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
   
///// activation of script:
//window.onload fires after all content (including images) has been loaded
//register_cleanupHashCode(); // uses the windows.onload

// activate now: (this js is now called AFTER <body> is complete
cleanupHashCode();