var curmes = 0
var a = 0
var counter = 0
var message = new Array()
message[0] = "Welcome to Rokni's web site"
var temp = ""
function typew() {
a = a + 1
check()
window.status = message[curmes].substring(0, a)
if(a == message[curmes].length + 5) {
curmes = curmes + 1
a = 0
}
if(curmes > 0) {
curmes = 0
}
counter = setTimeout("typew()", 150)
}

function check() {
if(a <= message[curmes].length) {
if(message[curmes].substring(a, a + 1) == "") {
a = a + 1
check()
}
}
}
function MakeArray(n){
  this.length = n;
  return this;
}
monthNames = new MakeArray(12)
monthNames[1] = "January";
monthNames[2] = "February";
monthNames[3] = "March";
monthNames[4] = "April";
monthNames[5] = "May";
monthNames[6] = "June";
monthNames[7] = "July";
monthNames[8] = "August";
monthNames[9] = "September";
monthNames[10] = "October";
monthNames[11] = "November";
monthNames[12] = "December";

dayNames = new MakeArray(7);
dayNames[1] = "Sunday";
dayNames[2] = "Monday";
dayNames[3] = "Tuesday";
dayNames[4] = "Wednesday";
dayNames[5] = "Thursday";
dayNames[6] = "Friday";
dayNames[7] = "Saturday";
function customDateString(oneDate) {
    var theDay = dayNames[oneDate.getDay() + 1];
    var theMonth = monthNames[oneDate.getMonth() + 1];
    var theYear = oneDate.getFullYear();
    return theDay + ", " + theMonth + " " +oneDate.getDate() + ", " + theYear;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function doorOpen1(url) {
mywin = window.open("images_works/community_myto_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=220,height=350');
}
function doorOpen2(url) {
mywin = window.open("images_works/community_alberta_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=220,height=350');
}
function doorOpen3(url) {
mywin = window.open("images_works/triangle_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=320,height=350');
}
function doorOpen4(url) {
mywin = window.open("images_works/sbrealestate_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=320,height=350');
}
function doorOpen5(url) {
mywin = window.open("images_works/NationalPost_article.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=600');
}
function doorOpen6(url) {
mywin = window.open("images_works/NationalPost_article.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=600');
}
function doorOpen7(url) {
mywin = window.open("images_works/discussion_myto_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=220,height=350');
}
function doorOpen8(url) {
mywin = window.open("images_works/discussion_alberta_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=220,height=350');
}
function doorOpen9(url) {
mywin = window.open("images_works/zip2_big.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=220,height=350');
}
function doorOpen10(url) {
mywin = window.open("images_works/bops.gif","newwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=220,height=350');
}

function toggle( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  	}
}


function timeAnnounce(){
newDate = new Date();
myWeek = newDate.getDate();
myYear = newDate.getFullYear();
myMonth = newDate.getMonth();
myDay = newDate.getDay();
var monthName = new Array ('January','February','March','April','May','June','July','August','September','October','November','December')
var theMonth = monthName[myMonth];
var daysName = new Array ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')
var theDay = daysName[myDay];
allTime =  theDay + ", " + theMonth + " " + myWeek + ", " + myYear;
newPara = document.createTextNode(allTime);
var addTimeStamp = document.getElementById("timeStamp");
addTimeStamp.appendChild(newPara);
}


