     function getElementPosition(element){
          var x=0,y=0;
          while (element!=null){
               x+=element.offsetLeft-element.scrollLeft;
               y+=element.offsetTop-element.scrollTop;
               element=element.offsetParent;
          }
          return {x:x,y:y};
     }

     function getElement(id){
          if (document.all)
               return document.all[id];
          if (document.getElementById(id))
               return document.getElementById(id);
          
          return null;
     }

     function moveAd(){
          element = getElement('pipBox');
          if (! element) return;
          position = getElementPosition(element);
		  if (position.y > 200) {
				if (document.all) {
					//document.all.pipAd.style.left=position.x+'px';
					document.all.pipAd.style.top=position.y+'px';
				}
				if (document.getElementById) {
					//document.getElementById('pipAd').style.left=position.x+'px';
					document.getElementById('pipAd').style.top=position.y+'px';
				}
			}
		//alert(position.x+","+position.y);
     }

function enlargeAd(url) {
	var w = '660';
	var h = '550';
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars'
		win = window.open(url, "PopUp", winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}