/***********************************************
* Scroller script-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var newstickerspeed=cache=1
var initialdelay=1000
function initializeScroller(){
    dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
    dataobj.style.top="5px"
    setTimeout("getdataheight()", initialdelay)
}
function getdataheight(){
    thelength=dataobj.offsetHeight
    if (thelength==0) setTimeout("getdataheight()",10); else scrollDiv()
}
function scrollDiv(){
    dataobj.style.top=parseInt(dataobj.style.top)-newstickerspeed+"px"
    if (parseInt(dataobj.style.top)<thelength*(-1)) dataobj.style.top="5px"
    setTimeout("scrollDiv()",40)
}
if (window.addEventListener)
    window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
    window.attachEvent("onload", initializeScroller)
else
    window.onload=initializeScroller
/**********************************************/

function validEmail (email) {
    invalidChars = " /:,;";
    for (i=0; i<invalidChars.length; i++) {
        badChar = invalidChars.charAt(i);
        if (email.indexOf(badChar, 0) != -1) return false // the function indexOf(,) returns -1 in case there isn't badChar.
    }
    atPos = email.indexOf("@", 1);
    if (atPos == -1) return false // there must be at least one "@" symbol.
    if (email.indexOf("@", atPos+1) != -1) return false // there must be only one "@" symbol.
    periodPos = email.indexOf(".", atPos);
    if (periodPos == -1) return false // there must be a point after "@" symbol.
    if (periodPos+3>email.length) return false // there must be two chars at least after the point.
    return true;
}


function newWindow(url,name,width,height,top,left,fullscreen,channelmode,toolbar,location,directories,status,menubar,scrollbars,resizable){
	if (top=='c') top = screen.height/2-height/2
	if (left=='c') left = screen.width/2-width/2
	winObject = window.open(url,name,'width=' + width + ',height=' + height + ',top=' + top + ',left=' + left + ',fullscreen=' + fullscreen + 'channelmode=' + channelmode + ',toolbar=' + toolbar + ',location=' + location + ',directories=' + directories + ',status=' + status + ',menubar=' + menubar + ',scrollbars=' + scrollbars + ',resizable=' + resizable + '\'')
	winObject.focus()
}
