function initSkin()
{
    initDynamicMenus();
    initRolloverMenus();
    initPortletDeleteButtons();
    // See the comments in float.js about this function...
    //initPortletFloatButtons();
}

/*************************************
* to cancel right-click on window.
* added by jeeva
*
***************************************/
function right(e) {
	if (navigator.appName == 'Netscape' && 
	(e.which == 3 || e.which == 2))
	return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' && 
	(event.button == 2 || event.button == 3)) {
	alert("Sorry, you do not have permission to right click.");
	return false;
		if(event.button == 8){
			return false;
		}
	}
	return true;
}


document.onkeydown = keyCatcher;
          
 function funDown() {
 	
	 if(window.event && window.event.keyCode == 112 ||  window.event.keyCode == 116){
	 // F1 to F12 key
		window.event.keyCode = 0; 	
	    return false;
    }

     if(window.event && window.event.keyCode == 17)  {
      // Capture and remap ctrl
       window.event.keyCode = 555; 	
       return false; 
     } 
    
 }
// allow only numbers.
function allowNo(aEvent){
    var intKeyCode;
    if( document.all )
     {
                      // IE
                      intKeyCode = aEvent.keyCode;
                     
     }else{
                      // Non IE
                      intKeyCode = aEvent.which;
                     
     }
     
    if(intKeyCode != 13 && intKeyCode != 8 && intKeyCode != 0){
	 if(intKeyCode < 48 ||  intKeyCode >= 58  ){
		if( document.all )
        {
                  // IE
                  aEvent.keyCode=0;
        }else{
                  // Non IE
                  aEvent.preventDefault();
        } 	
			return false;
		}
	}
}

function keyCatcher(e) {
    var intKeyCode;
    if( document.all )
    {
                  // IE
                  intKeyCode = event.keyCode;
                  e = event.srcElement.tagName;
    }else{
                  // Non IE 
                  intKeyCode = e.which;
                  e = e.target.tagName;
    }
	
	if (intKeyCode == 8 && e != "INPUT" && e != "TEXTAREA") {
	/*********************************************
		Blocks BACK SPACE key
		author: Jeevanantham Paramasamy
	*********************************************/
        if( document.all )
        {
                      // IE
                      event.cancelBubble = true;
                      event.returnValue = false;
        }else{
                      // Non IE
                      e.cancelBubble = true;
                      e.returnValue = false;
        }
	}
	for(i=112;i<124;i++){
	/*******************************************
		blocks F1 - F12 keys
		author: Jeevanantham Paramasamy
	********************************************/
		if(i==intKeyCode){
            if( document.all )
            {
                      // IE
                      event.keyCode=0;
                      return false;
            }else{
                      // Non IE
                      e.which=0;
                      return false;
            }
		}
       
	}

}

function denySpecial(aEvent){
var intKeyCode;
if( document.all )
 {
                  // IE
                  intKeyCode = aEvent.keyCode;
                 
 }else{
                  // Non IE
                  intKeyCode = aEvent.which;
                 
 }
/*************************************************************
	ALLOWS NUMBER and LETTERS, deni SPECIAL CHARS.
	author: Jeevanantham Paramasamy
*************************************************************/
var keys =  new Array(126, 33, 64, 35, 36, 37, 94, 38, 42, 40, 41, 95, 43, 63, 60, 62,45,61,47,58,59,123,125,92,124,91,93,39,34,44,96);
for(i=0;i<keys.length;i++){
	if(keys[i]==intKeyCode){
		alert("Special Characters are not allowed here");
		if( document.all )
        {
                  // IE
                  aEvent.keyCode=0;
        }else{
                  // Non IE
                  aEvent.preventDefault();
        }
	    return false;
	}
}
}




function allowOnlyChar(){
/*************************************************************
	ALLOWS LETTERS, deni SPECIAL CHARS and NUMBER  .
	author: Jeevanantham Paramasamy
*************************************************************/
var keys =  new Array(126, 33, 64, 35, 36, 37, 94, 38, 42, 40, 41, 95, 43, 63, 60, 62,45,61,47,48,49,50,51,52,53,54,55,56,57,58,59,123,125,92,124,91,93,39,34,44,96);

for(i=0;i<keys.length;i++){
	if(keys[i]==window.event.keyCode){
		alert('Special characters and numbers not allowed.');
		window.event.keyCode = 0; 	
	    return false;
	}
}
}

/********************************************************************************
	for disable netui button and change cursor type.
********************************************************************************/
function disableButton(fromname, btn){
	document.getElementById(lookupIdByTagId(btn, this)).disabled=true;
	//document.body.style.cursor = 'wait'; 
	document.getElementById(lookupIdByTagId(btn, this)).className='buttondisabled';
}
function enableButton(fromname, btn){
	document.getElementById(lookupIdByTagId(btn, this)).disabled=false;
	document.getElementById(lookupIdByTagId(btn, this)).className='login';
}
/********************************************************************************
	for disable button and change cursor type.
********************************************************************************/
function disableReset(buttonReset){
	document.getElementById(buttonReset).disabled=true;
	document.getElementById(buttonReset).className='buttondisabled';
}

/******************************************************************************
    GIVES MESSAGE FOR RESET ACTION.
******************************************************************************/

function resetMessage(msg){
    return confirm(msg);
}
