function vScroll( p_objName, p_divName ) {
	this.objName = p_objName;
	this.divName = p_divName;
	this.marqueewidth = "150px";
	this.marqueeheight = "150px";
	this.marqueespeed = 1;
	this.pauseit = 1;
	this.marqueecontent = "";
	
	this.marqueespeed = (document.all)? this.marqueespeed : Math.max(1, this.marqueespeed-1); //slow speed down by 1 for NS
	this.copyspeed = 1;
	this.pausespeed = (this.pauseit==0)? this.copyspeed: 0;
	this.iedom = document.all||document.getElementById;
	this.actualheight = '';
	this.cross_marquee = '';
	this.ns_marquee = '';
	
	this.scroll = vs_scrollmarquee;
	this.setContent = vs_setcontent;
	this.setSpeed = vs_setcopyspeed;
	this.setWidth = vs_setwidth;
	this.setHeight = vs_setheight;
	this.writeDiv = vs_writediv;
	
	this._getDiv = vs_getdiv;
	this._populate = vs_populate;
}

function vs_setcontent( p_content ) {
	this.marqueecontent = p_content;
}
function vs_setcopyspeed( p_speed ) {
	this.copyspeed = p_speed;
}
function vs_setwidth( p_w ) {
	this.marqueewidth = p_w;
}
function vs_setheight( p_h ) {
	this.marqueeheight = p_h;
}
function vs_writediv( p_outerCSS, p_innerCSS ) {
	document.write( this._getDiv(p_outerCSS,p_innerCSS) );
	this._populate();
}
function vs_getdiv( p_outerCSS, p_innerCSS ) {
	var outerClass = '';
	var innerClass = '';
	if( p_outerCSS )
		outerClass = "class='" + p_outerCSS + "'";
	if( p_innerCSS )
		innerClass = "class='" + p_innerCSS + "'";
	
	var mouseover = this.objName + ".setSpeed('" + this.pausespeed + "')";
	var mouseout = this.objName + ".setSpeed('" + this.marqueespeed + "')";
	var outerDiv = "<div "+outerClass+" style=\"position:relative; width:"+this.marqueewidth+"; height:"+this.marqueeheight+"; overflow:hidden;\" onmouseover=\""+mouseover+"\" onmouseout=\""+mouseout+"\">";
	var innerDiv = "<div id=\"" + this.divName + "\" "+innerClass+" style=\"position:absolute; left:0px; top:0px; width: 100%;\"></div>";
	outerDiv += (innerDiv + "</div>");
	
	return outerDiv;
}
function vs_populate() {
	if(this.iedom) {
		if( document.getElementById ) {
			this.cross_marquee = document.getElementById(this.divName);
		} else {
			this.cross_marquee = eval('document.all.'+this.divName);
		}
		this.cross_marquee.style.top = parseInt(this.marqueeheight)+8+"px";
		this.cross_marquee.innerHTML = this.marqueecontent;
		this.actualheight = this.cross_marquee.offsetHeight;
		//this.actualheight = parseInt(this.marqueeheight)*2.5;
	} else if(document.layers) {
		this.ns_marquee = document.ns_marquee.document.ns_marquee2;
		this.ns_marquee.top = parseInt(this.marqueeheight)+8;
		this.ns_marquee.document.write(this.marqueecontent);
		this.ns_marquee.document.close();
		this.actualheight = this.ns_marquee.document.height;
	}
	lefttime=setInterval(this.objName+".scroll()",30)
}

function vs_scrollmarquee(){
	if (this.iedom) {
		if (parseInt(this.cross_marquee.style.top)>(this.actualheight*(-1)+8)) {
			this.cross_marquee.style.top = parseInt(this.cross_marquee.style.top)-this.copyspeed+"px";
		} else {
			this.cross_marquee.style.top = parseInt(this.marqueeheight)+8+"px";
		}
	}
	else if (document.layers){
		if(this.ns_marquee.top > (this.actualheight*(-1)+8))
			this.ns_marquee.top -= this.copyspeed;
		else
			this.ns_marquee.top = parseInt(this.marqueeheight)+8;
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}
