function showDL() {
       if(document.getElementById("prompt_dl").style.display == "none") {
       		document.getElementById("prompt_dl").style.display = "block";
          document.getElementById("prompt_enter").style.display = "none";
       }
    }
       
       function showEnter(checkShowing) {
       if(document.getElementById("prompt_dl").style.display == "block") {
       		document.getElementById("prompt_dl").style.display = "none";
          document.getElementById("prompt_enter").style.display = "block";

       }
    }
       
       

function startclock(dnow, weekly, startHour, startMinute, endHour, endMinute, checkShowing, startHour2, startMinute2, endHour2, endMinute2) {
        
    if((dnow.getDay() == weekly) || (weekly < 0 && dnow.getDay() >=1 && dnow.getDay() <=5)) {
                
        if(checkShowing <= 1) {
                                
            if((dnow.getHours() >= startHour) && (dnow.getMinutes() >= startMinute)) {
                if((dnow.getHours() >= endHour) && (dnow.getMinutes() >= endMinute)){
                    showDL();
                    if(checkShowing > 0) {
                        checkShowing = 2  
                    }
                } else {
                    showEnter();
                }
            } else {
                showDL();    
            }
        }
        
        if(checkShowing == 2) {
           if((dnow.getHours() >= startHour2) && (dnow.getMinutes() >= startMinute2)) {
                if((dnow.getHours() >= endHour2) && (dnow.getMinutes() >= endMinute2)){
                    showDL();
                } else {
                    showEnter();
                }
            } else {
                showDL();
            } 
        }
    
    }

    
   /* var nhours=dnow.getHours();
    var nmins=dnow.getMinutes();
    var nsecn=dnow.getSeconds();
    var AorP=" ";
    
    if (nhours>=12)
        AorP="P.M.";
    else
        AorP="A.M.";
    
    if (nhours>=13)
        nhours-=12;
    
    if (nhours==0)
     nhours=12;
    
    if (nsecn<10)
     nsecn="0"+nsecn;
    
    if (nmins<10)
     nmins="0"+nmins;
     
    var DisplayStr = nhours + ":" + nmins + ":" + nsecn + " " + AorP;
    
    document.getElementById("cntdwn").innerHTML = DisplayStr;*/
        
    var timePast = Date.UTC(dnow.getFullYear(),dnow.getMonth(),dnow.getDate(),dnow.getHours(),dnow.getMinutes(),dnow.getSeconds()) + 14400000;
              
    dnow.setTime(timePast + 1000);
        
    setTimeout("startclock(dnow, weekly, startHour, startMinute, endHour, endMinute, checkShowing, startHour2, startMinute2, endHour2, endMinute2)",1000);

}

function putspan() {
//    document.write("<span id='cntdwn'></span>");
      document.write('<div id="prompt_enter" style="display:none;"><a href="http://express.paltalk.com/index.html?init_panel=reg&gid=1029354185&refc=83015" rel="external" class="tamsen-enter-room"><img src="http://blog.paltalk.com/paltalkshows/images/scene_images/download-arrow.gif" alt="Enter Room">Enter Room</a></div>');
	    document.write('<p id="prompt_dl" style="display:block;" class="tamsen-download">While you wait to chat with Matt and Tamsen, <a href="http://express.paltalk.com/index.html?init_panel=reg&refc=83015" rel="external">check out other rooms on PaltalkScene.</a></p>');
}


putspan();

if(onTwice) {
    var checkShowing = 1;
} else {
    var checkShowing = -1;
}
startclock(dnow, weekly, startHour, startMinute, endHour, endMinute, checkShowing, startHour2, startMinute2, endHour2, endMinute2);
