	function only_num(e)
	{
		var keynum;
		var keychar;
		var numcheck;
		if(window.event) // IE
		{
			keynum = e.keyCode;
		}
		else if(e.which) // Netscape/Firefox/Opera
		{
			keynum = e.which;
		}
		keychar = String.fromCharCode(keynum);
		numcheck = /\d/;
		return (numcheck.test(keychar) || keynum==9 || keynum==13);
	}

	function echeck(str) {
		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
//		alert(lat+" - "+lstr+" - "+ldot);
		if (str.indexOf(at)==-1){
		   return false;
		}
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false;
		}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    return false;
		}
		 if (str.indexOf(at,(lat+1))!=-1){
		    return false;
		 }
		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    return false;
		 }
		 if (str.indexOf(dot,(lat+2))==-1){
		    return false;
		 }
		 if (str.indexOf(" ")!=-1){
		    return false;
		 }
		 return true;
	}

function swapImg(img,newimg) {
 img.src='images/'+newimg
}

function do_main(smallimg,newpath,bigimg,description) {
	if (actual!=null)
	{
		document.getElementById(actual).style.border='none';
		
	}
	smallimg.style.border='2px solid red';
	actual=smallimg.id;
	document.getElementById('mainpic').src=newpath;
	document.getElementById('maintext').firstChild.nodeValue=description;
	bigpic=bigimg;
	window.scrollTo(0, 300);

}

function openbigpic() {
	window.open(bigpic);
}


var cross_marquee;
function populate(){
	cross_marquee=document.getElementById("iemarquee");
	if (cross_marquee!=null)
	{
		cross_marquee.innerHTML=marqueecontent;
		actualwidth=document.getElementById("temp").offsetWidth;
		cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
		lefttime=setInterval("scrollmarquee()",100)
	}
}

function scrollmarquee(){
	if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
		cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
	else
		cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
}

var existingLoadEvent = window.onload || function () {};
window.onload = function () {
	existingLoadEvent();
	populate();
}

function jump(obj){
	if (obj.value)
	{
		window.open(obj.value);
	}
}



