var height, width, wallpaperId;
var showBg = true;

function include( script ) {
    document.write('<' + 'script');
    document.write(' language="javascript"');
    document.write(' type="text/javascript"');
    document.write(' src="' + script + '">');
    document.write('</' + 'script' + '>');
}

function getParameter( name ) {
    var url = window.location.href;
    var paramsStart = url.indexOf("?");

    if(paramsStart == -1)
        return "";

    var paramString = url.substr(paramsStart + 1);
    var tokenStart = paramString.indexOf(name);
    if(tokenStart != -1){
     paramToEnd = paramString.substr(tokenStart + name.length + 1);
     var delimiterPos = paramToEnd.indexOf("&");

     if(delimiterPos == -1)
        return paramToEnd;
     else return paramToEnd.substr(0, delimiterPos);

    } else return "";
}
   
function maintainSize( minWidth, minHeight, div ) {
    if ( window.innerHeight ){
        height = parseInt(window.innerHeight);
        width = parseInt(window.innerWidth);			                
    }else {
        height = parseInt(document.body.offsetHeight);
        width = parseInt(document.body.offsetWidth);			                    
    }			
    height = ( height >  minHeight ) ? '100%' : minHeight + 'px';
    width = ( width >  minWidth ) ? '100%' : minWidth + 'px';
    var flash = document.getElementById( div );
    
    flash.style.height= height;
    flash.style.width = width;
}




function addOnLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}

