function confirmLink(ask){
document.frozenenter = true;   
if (typeof(window.opera) != 'undefined') return true; 	
return ret=confirm('Warning: ' + ask);}

function  _openFull(p1,titl){
// var x1='_std/bigpic.html?ltitle=' + p1 +(p1.search('.swf')?'&ext=swf':'') + '&rtitle=' + titl;
var x1='_std/bigpic.html?ltitle=' + p1 +(p1.search('.swf')?'':'') + '&rtitle=' + titl;
var a=window.open(x1, '', "height=100, width=100, status=no, scrollbars=no, menubar=no,  resizable=yes, left="+(screen.availWidth-100)/2+" , top="+(screen.availHeight-100)/2); 
a.focus();
return;
}

function trim(inputString) {
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function


function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function isUrl(url)
	{
	var urlRegxp = /^((http|https):\/\/)?(\w+\.)(\w+\.?)+$/
		if (urlRegxp.test(url) != true) return false;
		else return true;
	}

function linit(){
var ix=document.getElementById('limg').width, iy=document.getElementById('limg').height;
window.moveTo((screen.availWidth-ix)/2,(screen.availHeight-iy)/2);
window.resizeTo(ix, iy);
document.getElementById('table_loading').style.display='none';
return;
}

// Browser Detection Javascript
// copyright 1 February 2003, by Stephen Chapman, Felgall Pty Ltd

// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.

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("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 'MSIE';
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 show_hide_element(id)
{
if (document.getElementById(id))
	document.getElementById(id).style.display = ((document.getElementById(id).style.display == 'inline')?'none':'inline');
}

function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}