
zCounter=1
function startDrag() {
 if (document.readyState=="complete") {
  if (window._dragWindow) {
   window._dragging=true
   window._dragObject = document.all[window._dragWindow]
   window._dragObject._mouseLeft = event.offsetX
   window._dragObject._mouseTop = event.offsetY
   window._dragObject.style.zIndex=zCounter++
  } else
    if (window._current)
   window.document.all[window._current].style.zIndex=zCounter++
  window._current=null
  return window._dragWindow==null
 }
}
 
function moveMe() {
 if (window._dragging) {
  window._dragObject.style.pixelTop =  document.body.scrollTop + event.clientY - window._dragObject._mouseTop
  window._dragObject.style.pixelLeft = document.body.scrollLeft + event.clientX - window._dragObject._mouseLeft
  
 }
}
 
function clearDrag() {
 window._dragging=false
 window._dragWindow =window._dragObject= null
}
function doLoad() {
 if (document.all!=null) {
  document.onmousedown = startDrag;
  document.onmousemove = moveMe
  document.onmouseup = clearDrag
  
  document.ondragstart = new Function("return false")
 }
}


var baseline;
var xs_bv=0;
var xs_pHeight=300;
var xs_updown=1;
var xs_endpt=0;
var xs_ranonce=0;
var xs_pDivSeen=0;
var xs_pTuck=0;
var ua=navigator.userAgent.toLowerCase()
if ( (ua.indexOf("opera")==-1)&&((ua.indexOf("msie")!=-1)&&(ua.indexOf("windows")!=-1))||((ua.indexOf("msie 5")!=-1)&&(ua.indexOf("mac")!=-1)) ) {xs_bv=1}

function goo(){setTimeout("xs_pdEx()",8000);}
function xs_pdEx(){
	xs_pDiv.style.left = (document.body.offsetWidth/2-325);
	baseline = getPageCoords(popdownBaseline);
	xs_pTop = baseline.y - xs_pHeight; 
	if((xs_bv)&&(!xs_ranonce)){
	xs_pd();
	xs_endpt=100;
}
else{
	if(xs_pTuck == 1){
	if (xs_pDivSeen != 1){
	xs_pDiv.style.clip="rect(0,600,500,0)";
	xs_pDiv.style.display="";
	// xs_pDiv.style.top=31;
}


//xs_tuck();
}
}
}


function xs_pd(){
xs_ranonce=1;
if (((xs_pHeight<300)&&(xs_updown==0)) || ((xs_pHeight>3)&&(xs_updown==1))) {
if(xs_pHeight==300){xs_pDiv.style.display=""}
(xs_updown==0)?xs_pHeight+=3:xs_pHeight-=3;
(xs_updown==0)?xs_pTop-=3:xs_pTop+=3;
xs_pDiv.style.clip="rect(" + xs_pHeight + ",700,700,0)";
xs_pDiv.style.top=(xs_pTop+"px");
setTimeout("xs_pd();",10);
}
else{
if (xs_updown==1){
xs_pDiv.style.clip="rect(0,700,700,0)";
xs_pDiv.style.top=baseline.y;
xs_updown=0;
xs_endpt=parseInt(xs_pDiv.style.left);//xs_pDiv.style.left;
//setTimeout("xs_tuck2();",1000);
} else{
xs_pDiv.style.display='none';
xs_pDivSeen = 1;
xs_endpt=(document.body.offsetWidth/2-160);
//xs_tuck();
}
}
}
function xs_tuck2(){
if(xs_endpt<(document.body.offsetWidth-320)){
//xs_endpt=xs_pDiv.style.left;
xs_endpt+=5;

xs_pDiv.style.left=xs_endpt;
setTimeout("xs_tuck2();",20);
}
else{xs_pTuck2 = 1}
} function getPageCoords(element) {
var coords = {x: 0, y: 0};
while (element) {
coords.x += element.offsetLeft;
coords.y += element.offsetTop;
element = element.offsetParent;
}
return coords;
}
