<!--

var store_urls = new Array(	
new Array('August 01, 2011', '<td width="468"><a href="http://affiliates.vietbet.com/tracking/Affiliate.asp?AffID=VC000121&mediaTypeID=639&image=/tracking/banner/468x60/468x60_Bonus3_VIET.gif&AffUrlID=26" target="_top"><img src="http://affiliates.vietbet.com/tracking/banner.asp?AffID=VC000121&mediaTypeID=639&image=/tracking/banner/468x60/468x60_Bonus3_VIET.gif&AffUrlID=26" hspace="0" vspace="0" border="0" alt="Bet at Vietbet"></a></td>')
)


function show_ads()
{
	document.writeln('<table border="1" width="368" cellspacing="2" cellpadding="2" style="border-collapse: collapse; border-style: dashed; border-width: 1" bordercolor="#111111" >');
	document.writeln('<tr>');	
 	begin = Math.round(Math.random()*(store_urls.length));
 	today = new Date();
	for (i=0; i<store_urls.length; i++) { 			
		if ( begin == store_urls.length ) {
			begin = 0;
		}		
		expire = new Date(store_urls[begin][0]);
		if ( expire.getTime() > today.getTime() ) {
			document.writeln(store_urls[begin][1]); 		
		}	
		begin++;			
	}
	document.writeln('</tr></table>');		
}


function to_local(utc){
	// 2002-01-22-15:20:40
	var y = utc.substr(0,4);
	var m = utc.substr(5,2) - 1;
	var d = utc.substr(8,2);
	var h = utc.substr(11,2);
	var mn = utc.substr(14,2);
	var s = utc.substr(17,2);
	var ml = Date.UTC(y,m,d,h,mn,s);
	var d = new Date(ml);	
	document.writeln(d);
}

function fixElement(element, message) {
	alert(message);
	element.focus();
}
function valid_no_empty(text){
	if ( text.value.length == 0 )
	{
		return false;
	}
	return true;
}

function check_size(entry, len){
	if ( entry.value.length >= len ){
		fixElement(entry, "Your message is limited to: " + len + " chars. You've entered " + entry.value.length + " chars.");
		return false;
	}	
	return true;
}

function check_select(menu)  {
if (menu.selectedIndex == 0) 
{
	
	return false;
}
	return true;
}

function validate_contact_box(text){
	if (valid_no_empty(text)) {
			return true;
	}
	fixElement(text,"The box is empty!");
	return false;
}

// -->
