// JavaScript Document
function doMouseOver(obj){
  obj.bgColor= "#333333";

}
function doMouseOut(obj){
  obj.bgColor= "#535353";

}

function valInteger(id){
  var value =  document.getElementById(id).value; 	
  if(value == "" || isNaN(parseInt(value))  ){
	return false;							   
  }else{
	return true;
  }
}

function value(id){
  return document.getElementById(id).value; 	
  
}

function valueByInt(id){
  return parseInt(document.getElementById(id).value); 	
  
}

function valStringNotNull(id)
{
  return document.getElementById(id).value != "";	
}

function valStringMinLength(id, length)
{
  return document.getElementById(id).value.length >= length;
  	
}

function valEmail(id){      
    var obj = document.getElementById(id);
    var myReg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;     
    return (myReg.test( obj.value )) ;
}  

function show(id){
   
 // document.getElementById(id).style.visibility = 'visible';	
  document.getElementById(id).style.display = 'block';	
}

function hide(id){
	
 	
  document.getElementById(id).style.display = 'none';		
}

function setContent(id, content){
	document.getElementById(id).innerHTML = content;
	
	
}

// date 
var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31); 
function getDays(month, year) { 
  if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28; 
  else return daysInMonth[month]; 
}

function valDate(day, month, year){
  return day <= getDays(month, year)  ;
	  
  
}


//append text
window.onload = function() {

        var randomnumber = Math.floor(Math.random() * 7)
        var ArrayText = new Array();
ArrayText[0] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'Thank you for helping me find the woman of my dreams on your website. Thanks again.'</a> - <strong>Jenni</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
ArrayText[1] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'I contacted member jatslough and we began to chat. Weve met up a few times and things look promising.'</a> - <strong>Dee</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
ArrayText[2] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'We met last month on the site and now im introducing him to my parents this weekend.'</a> - <strong>meena</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
ArrayText[3] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'I have met a very nice lady from your website and we hope to get married in the future.'</a> - <strong>Sonya</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
ArrayText[4] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'Thank you for helping me find the woman of my dreams on your website. Thanks again.'</a> - <strong>Rick</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
ArrayText[5] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'How do you delete your profile? I have now met someone off the site and no longer need my profile.'</a> - <strong>Aman</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
ArrayText[6] = "<div style='width:420px;'><div style='float:left; margin-top:5px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>'ive just proposed to member Kiran_Princess and were getting married in the fall.'</a> - <strong>Kully</strong><strong style='margin-left:70px;'><a href='/struts/1addtsuccessstories.html' class='testlink'>More Success Stories >> </a></strong></div></div>";
                                                                       
		
        document.getElementById("divText").innerHTML = ArrayText[randomnumber];
        //document.getElementById("imgText").src = "images/" + randomnumber + ".jpg";
        
    };