var NS4 = (document.layers) ? 1 : 0;

var IE4 = (document.all) ? 1 : 0;

var num = 0;



var random_display = 1; // 0 = no, 1 = yes



var interval = 20000; // delay between entries (in milliseconds)



/* 

	Add entries here. 

	Always start with ar[0] and increment by one 

	Replace double quotes with single quotes within your entry

*/

var ar = new Array();

ar[0] = "Filing for divorce in North Carolina requires a one year separation... or a spouse with incurable insanity. <br> <br> <a href='http://www.ncga.state.nc.us/EnactedLegislation/Statutes/HTML/BySection/Chapter_50/GS_50-5.1.html' target='_blank'> Click here to read North Carolina statutes regarding divorce.</a>";

ar[1] = "You or your spouse must live in North Carolina for at least six months before you can file for divorce. <br> <br>  <a href='http://www.ncga.state.nc.us/EnactedLegislation/Statutes/HTML/BySection/Chapter_50/GS_50-8.html' target='_blank'> Click here to read North Carolina statutes regarding divorce.</a>";

ar[2] = "During a separation in North Carolina, a court can make temporary decisions about child custody, child support, spousal support and other issues.  <br> <br> <a href='http://www.wakefamilylawgroup.com/nc-family-law_questions/divorce-nc.html'> Click here to learn more about separation in North Carolina.</a>";

ar[3] = "Neither parent is automatically entitled to the custody of any child. The decision is based on what is in the best interest of the child.  <br> <br> <a href='http://www.wakefamilylawgroup.com/nc-family-law_questions/child-custody-nc.html'> Click here to learn more about child custody issues in North Carolina.</a>";

ar[4] = "North Carolina law requires that all property accumulated during the marriage (excluding some gifts and inheritances) shall be divided equitably. <br> <br> <a href='http://www.wakefamilylawgroup.com/nc-family-law_questions/equitable-distribution-nc.html'> Click here to learn more about the division of assets.</a>";

ar[5] = "Equitable distribution does not necessarily mean equal distribution. <br> <br> <a href='http://www.wakefamilylawgroup.com/nc-family-law_questions/equitable-distribution-nc.html'> Click here to learn more about the division of assets in North Carolina.</a>";

ar[6] = "Child support payments in North Carolina are not tax deductible. <br> <br> <a href='http://www.alllaw.com/calculators/Childsupport/north_carolina' target='_blank'> Click here to calculate potential North Carolina child support payments.</a>";

ar[7] = "If you are required to pay alimony, those payments may be tax deductible. If you receive alimony payments, you may be required to pay taxes on that income. <br> <br> <a href='http://www.wakefamilylawgroup.com/nc-family-law_questions/child-support-nc.html'> Click here to learn more about North Carolina tax-related issues.</a>";



var arLen = ar.length;



function generate(x, y) {

	var range = y - x + 1;

	return Math.floor(Math.random() * range) + x;

}



function update(id) {

	if (random_display) {

		num = generate(0, arLen-1);

	}else{

		num++;

  		if(num == arLen){

  			num = 0;

  		}

	}

  	display(id, ar[num]);

}



function display(id, str) {

  if (NS4) {

    with (document[id].document) {

      open();

      write(str);

      close();

    }

  } else {  

    document.getElementById(id).innerHTML = str;

  }

}



function didYouKnowRotate(id) {

  setInterval("update('"+id+"')", interval);

}



function didYouKnowRotateInit(id) {

  display(id, ar[0]);

  update(id);

  didYouKnowRotate(id);

}
