/*
-----------------------------------------------------------
	scroll.js
	(C)2004 Transcend Corp., 
-----------------------------------------------------------
*/

var ec_bv=0;
var ec_pTop=-86;
var ec_pHeight=211;
var ec_updown=1;
var ec_endpt=0;
var ec_ranonce=0;
var ec_pDivSeen=0;
var ec_pTuck=0;
var ua=navigator.userAgent.toLowerCase()
function xsGetCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function xsGetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
//return xsGetCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break; }
return null;
}
function xsSetCookie (name,value,expires,path,domain,secure) {
//document.cookie = name + "=" + escape (value) +
//((expires) ? "; expires=" + expires.toGMTString() : "") +
//((path) ? "; path=" + path : "") +
//((domain) ? "; domain=" + domain : "") +
//((secure) ? "; secure" : "");
}
var ec_exp = new Date(); ec_exp.setTime(ec_exp.getTime()+(48*60*60*1000));
if ( (ua.indexOf("opera")==-1)&&((ua.indexOf("msie")!=-1)&&(ua.indexOf("windows")!=-1))||((ua.indexOf("msie 5")!=-1)&&(ua.indexOf("mac")!=-1)) ) {ec_bv=1}


function ec_scroll(){
var ec_popval = xsGetCookie('seenexp');
if ((ec_popval == null) || (ec_popval != "1")) {
ec_popval=1;
xsSetCookie('seenexp', ec_popval, ec_exp, "/");
var ec_ctest = (xsGetCookie('seenexp')=="1");
}
if((ec_bv)&&(!ec_ranonce)&&(ec_ctest!=null)){
// if((ec_bv)&&(!ec_ranonce)){
//ec_pDiv2.style.left=ec_pDiv.style.left=((document.body.offsetWidth/2)-160)
ec_pDiv2.style.left=ec_pDiv.style.left=456;
ec_pd();
}
else{
if(ec_pTuck == 1){
if (ec_pDivSeen != 1){
ec_pDiv.style.clip="rect(0,320,211,0)";
ec_pDiv.style.display="";
ec_pDiv.style.top=33;
}
//ec_endpt=(document.body.offsetWidth/2)-160;
ec_endpt=(156/2)-160;
ec_tuck();
}
}
}

function ec_pd(){
ec_ranonce=1;
if (((ec_pHeight<211)&&(ec_updown==0)) || ((ec_pHeight>3)&&(ec_updown==1))) {
if(ec_pHeight==211){ec_pDiv.style.display=""}
(ec_updown==0)?ec_pHeight+=3:ec_pHeight-=3;
(ec_updown==0)?ec_pTop-=3:ec_pTop+=3;
ec_pDiv.style.clip="rect(" + ec_pHeight + ",320,211,0)";
ec_pDiv.style.top=ec_pTop;
setTimeout("ec_pd();",20);
}
else{
if (ec_updown==1){
ec_pDiv.style.clip="rect(0,320,211,0)";
ec_pDiv.style.top=125;
ec_updown=0;
ec_pDiv2.style.display='';
setTimeout("ec_pd();",3000);
}
else{
ec_pDiv.style.display='none';
ec_pDivSeen = 1;
ec_endpt=(document.body.offsetWidth/2)-160;
ec_tuck();
}
}
}
function ec_tuck(){
if(ec_endpt<(document.body.offsetWidth-355)){
ec_endpt+=5;
ec_pDiv2.style.left=ec_endpt;
setTimeout("ec_tuck();",20);
}
else{ec_pTuck = 1}
}
