function modtext(){
if(document.getElementById('textmod')){
var mywords=new Array();
var mylink=new Array();
var myalt=new Array();
mywords[0] = "Luxbet";
mylink[0] = "/linkout.php?ad=123";
myalt[0] = "Free $100 deposit bonus";
mywords[1] = "iasbet.com";
mylink[1] = "/linkout.php?ad=46";
myalt[1] = "bet with iasbet.com and get a $100 free bet";
mywords[2] = "betfair";
mylink[2] = "/linkout.php?ad=50";
myalt[2] = "get 20% better odds at betfair";
mywords[3] = "Sportsbet";
mylink[3] = "/linkout.php?ad=59";
myalt[3] = "Get up to $200 in free bets";
mywords[4] = "iasbet";
mylink[4] = "/linkout.php?ad=45";
myalt[4] = "Bet with iasbet and get a $100 free bet";
mywords[5] = "Betfair";
mylink[5] = "/linkout.php?ad=51";
myalt[5] = "get 20% better odds at Betfair";
mywords[6] = "Sportingbet";
mylink[6] = "/linkout.php?ad=62";
myalt[6] = "Australia\'s biggest online bookie";
mywords[7] = "IASbet";
mylink[7] = "/linkout.php?ad=47";
myalt[7] = "bet with IASbet and get a $100 free bet";
mywords[8] = "www.iasbet.com";
mylink[8] = "/linkout.php?ad=48";
myalt[8] = "bet with iasbet.com and get a $100 free bet";
mywords[9] = "www.IASbet.com";
mylink[9] = "/linkout.php?ad=49";
myalt[9] = "bet with www.IASbet.com and get a $100 free bet";
mywords[10] = "Sportsbet";
mylink[10] = "/linkout.php?ad=121";
myalt[10] = "$200 bet bundle for new customers";
mywords[11] = "Bet365.com";
mylink[11] = "/linkout.php?ad=97";
myalt[11] = "200%1st deposit bonus";
mywords[12] = "free bet comparison table";
mylink[12] = "http://www.bet-au.com/freebets.php";
myalt[12] = "free bets";
mywords[13] = "Sportsbet";
mylink[13] = "/linkout.php?ad=120";
myalt[13] = "$200 bet bundle for new customers";
mywords[14] = "Centrebet";
mylink[14] = "/linkout.php?ad=122";
myalt[14] = "$50 free bet for new customers";
mywords[15] = "IASbet";
mylink[15] = "/linkout.php?ad=126";
myalt[15] = "Bet $50 and get a $100 free bet";
mywords[16] = "Sportsbet";
mylink[16] = "/linkout.php?ad=140";
myalt[16] = "$200 in free cricket bets";
mywords[17] = "Sportsbet";
mylink[17] = "/linkout.php?ad=134";
myalt[17] = "$200 in free bets";
mywords[18] = "IASbet";
mylink[18] = "/linkout.php?ad=135";
myalt[18] = "$100 free World Cup bet";
mywords[19] = "Sportsbet";
mylink[19] = "/linkout.php?ad=139";
myalt[19] = "Free $200 tennis bet";
mywords[20] = "Sportsbet";
mylink[20] = "/linkout.php?ad=141";
myalt[20] = "$200 Free Soccer bets";
mywords[21] = "Sportsbet";
mylink[21] = "/linkout.php?ad=142";
myalt[21] = "Free $80 bet for new customers. 100% matched stake";
mywords[22] = "Sportsbet";
mylink[22] = "/linkout.php?ad=144";
myalt[22] = "$200 free bets";
mywords[23] = "Helmet";
mylink[23] = "/linkout.php?ad=152";
myalt[23] = "Bet on Helmet";
mywords[24] = "Huegill";
mylink[24] = "/linkout.php?ad=153";
myalt[24] = "Bet on Huegill";
mywords[25] = "Manawanui";
mylink[25] = "/linkout.php?ad=154";
myalt[25] = "Bet on Manawanui";
mywords[26] = "Smart Missile";
mylink[26] = "/linkout.php?ad=155";
myalt[26] = "Bet on Smart Missile";
mywords[27] = "Chase The Rainbow";
mylink[27] = "/linkout.php?ad=156";
myalt[27] = "Bet on Chase The Rainbow";
mywords[28] = "Specter";
mylink[28] = "/linkout.php?ad=157";
myalt[28] = "Bet on Specter";
mywords[29] = "Secret Hills";
mylink[29] = "/linkout.php?ad=158";
myalt[29] = "Bet on Secret Hills";
mywords[30] = "General Offer";
mylink[30] = "/linkout.php?ad=159";
myalt[30] = "Bet on General Offer";
mywords[31] = "December Draw";
mylink[31] = "/linkout.php?ad=160";
myalt[31] = "Bet on December Draw";
mywords[32] = "Americain";
mylink[32] = "/linkout.php?ad=161";
myalt[32] = "Bet on Americain";
mywords[33] = "Lucas Cranach";
mylink[33] = "/linkout.php?ad=162";
myalt[33] = "Bet on Lucas Cranach";
mywords[34] = "Dunaden";
mylink[34] = "/linkout.php?ad=163";
myalt[34] = "Bet on Dunaden";
mywords[35] = "Unusual Suspect";
mylink[35] = "/linkout.php?ad=164";
myalt[35] = "Bet on Unusual Suspect";
mywords[36] = "Midas Touch";
mylink[36] = "/linkout.php?ad=165";
myalt[36] = "Bet on Midas Touch";
mywords[37] = "Illo";
mylink[37] = "/linkout.php?ad=166";
myalt[37] = "Bet on Illo";
mywords[38] = "Jukebox Jury";
mylink[38] = "/linkout.php?ad=167";
myalt[38] = "Bet on Jukebox Jury";
mywords[39] = "At First Sight";
mylink[39] = "/linkout.php?ad=168";
myalt[39] = "Bet on At First Sight";
mywords[40] = "Bauer";
mylink[40] = "/linkout.php?ad=169";
myalt[40] = "Bet on Bauer";
mywords[41] = "Glass Harmonium";
mylink[41] = "/linkout.php?ad=170";
myalt[41] = "Bet on Glass Harmonium";
mywords[42] = "Green Moon";
mylink[42] = "/linkout.php?ad=171";
myalt[42] = "Bet on Green Moon";
mywords[43] = "Tanby";
mylink[43] = "/linkout.php?ad=172";
myalt[43] = "Bet on Tanby";
mywords[44] = "Tullamore";
mylink[44] = "/linkout.php?ad=173";
myalt[44] = "Bet on Tullamore";
mywords[45] = "Mourayan";
mylink[45] = "/linkout.php?ad=174";
myalt[45] = "Bet on Mourayan";
mywords[46] = "Fox Hunt";
mylink[46] = "/linkout.php?ad=175";
myalt[46] = "Bet on Fox Hunt";
mywords[47] = "Drunken Sailor";
mylink[47] = "/linkout.php?ad=176";
myalt[47] = "Bet on Drunken Sailor";
mywords[48] = "Modun";
mylink[48] = "/linkout.php?ad=177";
myalt[48] = "Bet on Modun";
mywords[49] = "All other runners";
mylink[49] = "/linkout.php?ad=178";
myalt[49] = "All other runners";
mywords[50] = "Niwot";
mylink[50] = "/linkout.php?ad=179";
myalt[50] = "Bet on Niwot";
mywords[51] = "Moyenne Corniche";
mylink[51] = "/linkout.php?ad=180";
myalt[51] = "Bet on Moyenne Corniche";
mywords[52] = "Manighar";
mylink[52] = "/linkout.php?ad=181";
myalt[52] = "Bet on Manighar";
mywords[53] = "Precedence";
mylink[53] = "/linkout.php?ad=182";
myalt[53] = "Bet on Precedence";
mywords[54] = "Lost In The Moment";
mylink[54] = "/linkout.php?ad=183";
myalt[54] = "Bet on Lost In The Moment";
mywords[55] = "Red Cadeaux";
mylink[55] = "/linkout.php?ad=184";
myalt[55] = "Bet on Red Cadeaux";
mywords[56] = "CLICK HERE";
mylink[56] = "/linkout.php?ad=185";
myalt[56] = "CLICK HERE";
mywords[57] = "NRL odds 2012";
mylink[57] = "http://www.bet-au.com/rugby/nrl-odds-2012-premiership-and-grand-final-betting.htm";
myalt[57] = "NRL odds 2012";
mywords[58] = "2012 Coleman Medal Odds";
mylink[58] = "http://www.bet-au.com/aussie-rules/2012-afl-coleman-medal-odds-and-betting.htm";
myalt[58] = "2012 Coleman Medal Odds";
mywords[59] = "AFL odds 2012";
mylink[59] = "http://www.bet-au.com/aussie-rules/afl-odds-2012-premiership-and-grand-final-betting.htm";
myalt[59] = "AFL odds 2012";
mywords[60] = "Brownlow odds 2012";
mylink[60] = "http://www.bet-au.com/aussie-rules/2012-afl-brownlow-medal-odds-and-betting.htm";
myalt[60] = "Brownlow odds 2012";
mywords[61] = "NAB Rising Star Odds";
mylink[61] = "http://www.bet-au.com/aussie-rules/2012-afl-nab-rising-star-odds-and-betting.htm";
myalt[61] = "NAB Rising Star Odds";
for (var k=0;k < mywords.length;k++){
var str = document.getElementById('textmod').innerHTML;
var txt = mywords[k];
//old broken line of code var txt=new RegExp(mywords[k],'k');//g = global / i = case insensitive
//var txt=new RegExp(mywords[k],'i');//g = global / i = case insensitive
// document.getElementById('textmod').innerHTML = str.replace(txt,' '+mywords[k]+' ');
var fnd=new RegExp('('+txt+')(?![^<]*>|[^<]*<\/a>)','gi');
var pos = mylink[k].indexOf("bet-au.com");
if (pos>=0){
var ns = str.replace(fnd,' '+mywords[k]+' ');
}else{
var ns = str.replace(fnd,' '+mywords[k]+' ');
}
document.getElementById('textmod').innerHTML = ns;
}
}
replaceLinkPrice();
}
//// affiliate currency replace
function replaceLinkPrice(){
var hasClassName = new RegExp("(?:^|\\s)" + 'alink' + "(?:$|\\s)");
var allElements = document.getElementsByTagName("*");
var results = [];
var element;
for (var i = 0; (element = allElements[i]) != null; i++) {
var elementClass = element.className;
if (elementClass && elementClass.indexOf('alink') != -1 && hasClassName.test(elementClass))
results.push(element);
}
for ( var i=0, len=results.length; i' + results[i].innerHTML + '';
}
return false;
}
//////// val
function validate(theform){
var errors = 0;
if(document.validateme.fname){
if(!notempty(document.validateme.fname.value)){
errors++;
document.validateme.fname.style.border = '1px solid red';
}else{
document.validateme.fname.style.border = '1px solid green';
}
}
if(document.validateme.fsurname){
if(!notempty(document.validateme.fsurname.value)){
errors++;
document.validateme.fsurname.style.border = '1px solid red';
}else{
document.validateme.fsurname.style.border = '1px solid green';
}
}
if(document.validateme.email){
if(checkMail(document.validateme.email.value)){
errors++;
document.validateme.email.style.border = '1px solid red';
}else{
document.validateme.email.style.border = '1px solid green';
}
}
if(document.validateme.dayofyear){
if(document.validateme.dayofyear.value == 'DD' ){
errors++;
document.validateme.dayofyear.style.border = '1px solid red';
}else{
document.validateme.dayofyear.style.border = '1px solid green';
}
}
if(document.validateme.month){
if(document.validateme.month.value == 'MM'){
errors++;
document.validateme.month.style.border = '1px solid red';
}else{
document.validateme.month.style.border = '1px solid green';
}
}
if(document.validateme.year){
if(document.validateme.year.value == 'YYYY'){
errors++;
document.validateme.year.style.border = '1px solid red';
}else{
document.validateme.year.style.border = '1px solid green';
}
}
if(document.validateme.telephone){
if(checkNum(document.validateme.telephone.value)){
errors++;
document.validateme.telephone.style.border = '1px solid red';
}else{
document.validateme.telephone.style.border = '1px solid green';
}
}
if(document.validateme.telephone2){
if(checkNum(document.validateme.telephone2.value)){
errors++;
document.validateme.telephone2.style.border = '1px solid red';
}else{
document.validateme.telephone2.style.border = '1px solid green';
}
}
if(document.validateme.comment){
if(!notempty(document.validateme.comment.value)){
errors++;
document.validateme.comment.style.border = '1px solid red';
}else{
document.validateme.comment.style.border = '1px solid green';
}
}
if(errors == 0){
document.validateme.submit();
}else{
alert('Please check data');
}
}
function notempty(val){ if(val == ''){ return false; }else{ return true; } }
function checkNum(fieldval){
var NumberToTest = fieldval.split(' ').join('');
var IsFound = /^-?\d+$/.test(NumberToTest);
if((IsFound) && (NumberToTest.length >= 7) && (NumberToTest.length < 12)){
return false;
}else{
return true;
}
}
function checkMail(value)
{ var x = value;
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(x))
return false;
else return true;
}