/** Library, Sammlung nütlicher Funktionen
 * Sammlung fremdem und eigenem Codes
 * 
 * @date       19.04.2008   
 * @version    0.001
 * 
 * @references addLoadEvent(func), 'http://simonwillison.net/2004/May/26/addLoadEvent/'
 *  
 */

/** Browser *******************************************************************/
/** Window ********************************************************************/

/** More than one onload-Event 
* @example     addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
* @example     addLoadEvent(function() {  more code to run on page load  });
*/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
//window.addEventHandler/window.addEventListener


/** URL  **********************************************************************/

function get_urlGET( get, url ){
  var httpGET_VARS = new Array();
  strGET = url.split('?');
  if( strGET.length <= 1 ) return false; 
  strGET = strGET[1];
  if( strGET!='' ){
    var tmpArr = strGET.split('&');
    for( var i = 0, l = tmpArr.length; i < l ; ++i){
        tmpValue ='';
        var tmpEntry = tmpArr[i].split('=');
        if( tmpEntry.length > 1 ){ 
          tmpValue = tmpEntry[1]; 
        }
        httpGET_VARS[unescape(tmpEntry[0])]=unescape(tmpValue);
        }
    }
    if(!httpGET_VARS[get]){return 'undefined';}
    return httpGET_VARS[get];
}

function get_httpGET( inputStr ){
  var httpGET_VARS = new Array();
  strGET = self.location.search.substr( 1, self.location.search.length );
  if( strGET!='' ){
    var tmpArr = strGET.split('&');
    for( var i = 0, l = tmpArr.length; i < l ; ++i){
        tmpValue ='';
        var tmpEntry = tmpArr[i].split('=');
        if( tmpEntry.length > 1 ){ 
          tmpValue = tmpEntry[1]; 
        }
        httpGET_VARS[unescape(tmpEntry[0])]=unescape(tmpValue);
        }
    }
    if(!httpGET_VARS[inputStr]){return 'undefined';}
    return httpGET_VARS[inputStr];
}


//alert(document.getElementsByTagName('script')[0].src;

/** Date **********************************************************************/

/** Document ******************************************************************/

/** String ********************************************************************/

/** Array *********************************************************************/

/** Math **********************************************************************/


