function showImage(url, width, height)
{
	var wnd = window.open("", "sfimage", "width=" + width + ",height=" + height);
	var doc = wnd.document;
		
	doc.open();
				
	doc.write('<html><head><title></title></head><body bgcolor="#000000" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" link="#000000" onBlur="self.close()">'); 
    doc.write('<a href="javascript:self.close()">'); 
    doc.write('<img src="' + url + '" width="' + width + '" height="' + height + '" alt="" border="0">');
    doc.write('</a>');  
    doc.write('</body></html>');
    
	doc.close();
	wnd.focus();
}

function putFlash( swf, ima, w, h, ver )
{
	var flashOk = false;	
	if( navigator.appName == "Microsoft Internet Explorer" ) {
   		flashOk = (navigator.platform.indexOf("Win")>=0 || navigator.platform.indexOf("Mac")>=0 );
	} 
	else if( navigator.appName == "Netscape" ) {
	    var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : false;
    	flashOk = (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= ver );
	}
	if(flashOk) {
		document.write('<embed src="'+swf+'" width="'+w+'" height="'+h+'" menu="false" swliveconnect="true" mayscript="mayscript" type="application/x-shockwave-flash" align="top" scale="exactfit" loop="true">');
	}
	else {
		document.write('<img src="'+ima+'" width="'+w+'" height="'+h+'" border="0">');
	}
}

function WF_isNotEmail(formField, errorMessage)
{
  var v = formField.value;
  if(v.length==0) return false;
  var fa = v.indexOf('@');
  var fb = v.indexOf('@', fa + 1);
  var fc = v.indexOf('.', fa + 2);
  if(fa<0 || fb>0 || fc<0)
  {
      window.alert(errorMessage);
      formField.focus();
      return true;
  }
  return false;
}

function WF_isEmpty(formField, errorMessage)
{
	var v = formField.value;
	if(v.length==0)
	{
		window.alert(errorMessage);
		formField.focus();
		return true;
	}
	return false;
}

function WF_isListEmpty(list, errorMessage)
{
	var v = list.options[list.selectedIndex].value;
	if(v.length==0)
	{
		window.alert(errorMessage);
		list.focus();
		return true;
	}
	return false;
}

function WF_isGroupEmpty(group, errorMessage)
{
	for(var i=0;i<group.length;i++) {
		if(group[i].checked) return false;
	}
	window.alert(errorMessage);
	group[0].focus();
	return true;
}

