function clientX( e )
{
    return window.event ? window.event.clientX : e.clientX;
 }
 
 
 function clientY( e )
 {
    return window.event ? window.event.clientY : e.clientY;
 }
 
 
 function getMouseScreenCoordsX( e, obj )
 {
 		
 	if( typeof(window.event) == 'object')
 	{
 		objposx = parseInt( obj.style.left );
 		mouseposx = window.event.clientX + objposx;
 	}
 	else
 	{
 		mouseposx = e.screenX;
 	}
 
 	return mouseposx;
 	
 }
 
 
 function getMouseScreenCoordsY( e, obj )
 {
 		
 	if( typeof(window.event) == 'object')
 	{
 		objposy = parseInt( obj.style.top );
 		mouseposy = window.event.clientY + objposy;
 	}
 	else
 	{
 		mouseposy = e.screenY;
 	}
 
 	return mouseposy;
 	
}


function getElement( name )
{

	if( document.all )
	{
		myelement = document.all[name];
	}
	else
	{
		myelement = window.document.getElementById( name );
	}
			
	return myelement;
	
}


function getFensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}


function getFensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


function getWinSize(){ 
   var size = {w:0 ,h:0} 
   var win = window; 
    
   size.w = win.innerWidth ? win.innerWidth : win.document.body.clientWidth; 
   size.h = win.innerHeight ? win.innerHeight : win.document.body.clientHeight; 

   return size; 
}


function placeObjectInWindowCenter( window_size, object_size )
{
	
	return ( ( window_size / 2 ) - ( object_size / 2 ) );
	
}


function getEventTarget( e )
{
	
	target = window.Event ? e.target : window.event.srcElement;

	return target;
	
}


var sbsHttpRequestObject = false;

// Mozilla, Opera, Safari sowie Internet Explorer 7
if (typeof(XMLHttpRequest) != 'undefined') {
	sbsHttpRequestObject = new XMLHttpRequest();
}
if (!sbsHttpRequestObject) {
	// Internet Explorer 6 und älter
	try {
		sbsHttpRequestObject  = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		try {
			sbsHttpRequestObject  = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {
			sbsHttpRequestObject  = false;
		}
	}
}


function send_sbsSimpleHttpRequest( requestUrl )
{

	if (sbsHttpRequestObject)
	{
		sbsHttpRequestObject.open("GET", requestUrl, false);
		sbsHttpRequestObject.send(null);
	}

}
									
