function confirmAction( text )
{
	return confirm( text );
}
function handleOnBodyLoad()
{
	//setClock();
	//window.setTimeout( "setClock()", 5000 );
}

function validateDateInput( object, evnt )
{
	if(evnt.keyCode == 8 ) return true;
//	if(evnt.keyCode == 127 ) return true;
	
	if( object.value.length == 2 ) {
		object.value = object.value+'.';
	}
	if( object.value.length == 5 ) {
		object.value = object.value+'.';
	}
	if( object.value.length > 10 ) {
		return false;
	}
}
function validateDate( value, object )
{
	if(window.event.keyCode == 0 ) return true;
	if( value.length == 2 ) {
		object.value = object.value+'.';
	}
	if( value.length == 5 ) {
		object.value = object.value+'.';
	}
	if( value.length > 10 ) {
		return false;
	}
}

function sendAsyncRequest( strURL, postString, resultdiv_id )
{
	var xmlhttp=false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.
	 try {
	  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	 } catch (e) {
	  try {
	   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (E) {
	   xmlhttp = false;
	  }
	 }
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	  xmlhttp = new XMLHttpRequest();
	}
	var status;
    xmlhttp.open('POST', strURL, true);
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            document.getElementById( resultdiv_id ).innerHTML = xmlhttp.responseText;
//            alert(resultdiv_id);
        }
    }
    xmlhttp.send(postString);
}

function toggleDisplay( id )
{
	var el = document.getElementById(id);
	if( el.style.display == '' )
	{
		el.style.display = 'none';
	} else {
		el.style.display = '';
	}
	
}

function playSong( playerdiv, songurl )
{
	var div = document.getElementById( playerdiv );
//	alert(div);
	div.innerHTML = '<a href="javascript: stopSong(\''+playerdiv+'\');">X</a> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="mptest" align="middle">' +
	'<param name="movie" value="/mptrip.swf?mp3url='+songurl+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="/mptrip.swf?mp3url='+songurl+'" quality="low" bgcolor="#000000" width="50" height="10" name="mptrip" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
	'</object>';
}
function stopSong( playerdiv )
{
	var div = document.getElementById( playerdiv );
//	alert(div);
	div.innerHTML = '';
}
