function swapIn(elm){
	elm.src=elm.src.replace(/.jpg/i,'_over.jpg');
	elm.src=elm.src.replace(/.gif/i,'_over.gif');
}

function swapOut(elm){
	elm.src=elm.src.replace(/_over.jpg/i,'.jpg');
	elm.src=elm.src.replace(/_over.gif/i,'.gif');
}

function showText(DId, PId){
	if(document.getElementById(DId).style.display == 'none'){//If the text is not shown, and the arrow points right
		document.getElementById(DId).style.display = 'block';
		document.getElementById(PId).src = '/AjrGfx/gfx/arrow_down.gif';
	}
	else{
		document.getElementById(DId).style.display = 'none';
		document.getElementById(PId).src = '/AjrGfx/gfx/arrow_right.gif';
	}
	
}

function showCalendar(PId,SId){
	if(document.getElementById(PId).style.display == 'block'){
		document.getElementById(PId).style.display = 'none';
	}
	else{ 
		document.getElementById(SId).style.display = 'none';
		document.getElementById(PId).style.display = 'block';
		}
}


function showTopMenu(){
	document.getElementById('topmenu01').style.display = 'block';
}


function rendermail(user, domain, classname, style){
  var1=user;
  var2=domain;
  var3=var1+'@'+var2;
  emailE=(var3);
  document.write ('<a class="'+ classname +'" style="'+style+'" href="mailto:' + emailE + '">' + emailE + '<\/a>');
}

function StartClientMail(user, domain){
  var1=user;
  var2=domain;
  var3=var1+'@'+var2;
  emailE=(var3);
  document.location.href='mailto:' + emailE;
}

function onEnter( evt, frm ) {
	var keyCode = null;

	if( evt.which ) {
		keyCode = evt.which;
	} else if( evt.keyCode ) {
		keyCode = evt.keyCode;
	}
	if( 13 == keyCode ) {
		frm.btnEnter.click();
		return false;
	}
	return true;
}

function getPrintPage(){
	if(document.getElementById('AjrPrintContent') != null){
		var pageP = window.open('/print.asp','Print','width=680, height=650, resizable=1')
	}
}

function printPage(){

	window.document.title = window.opener.document.title;

	var sOut;
	sOut = '';

	if (window.opener.document.getElementById('AjrPrintContent')) {
	  sOut = sOut + window.opener.document.getElementById('AjrPrintContent').innerHTML;
	}

	if (window.opener.document.getElementById('AjrPrintContent2')) {
	  sOut = sOut + '<div style="margin-top: 30px;">' + window.opener.document.getElementById('AjrPrintContent2').innerHTML + '</div>';
	}

	document.getElementById('AjrPrintContent').innerHTML = sOut;
	document.body.style.backgroundImage='none';
	document.body.style.backgroundColor='#ffffff';

	window.print();
}
