/*crm.js*/

function focus(){
document.searchbox.zoom_query.focus();
}
//Date Function
var d=new Date()
var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var fulldate =(weekday[d.getDay()] + "&nbsp;&nbsp;&nbsp;" + monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear())
var partialdate =(monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear())
function agenda() {
window.open("http://www.rockymountnc.gov/pbs/topics.asp?ForumID=5","PBS","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=600,height=400")
}
function calendar() {
window.open("http://www.rockymountnc.gov/citycal/","calWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=800,height=580");
}
function cemetery() {
window.open("http://www.rockymountnc.gov/parks/mayorpineview.html","pineview","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width=700,height=560")
}
function citynews() {
window.open("http://www.rockymountnc.gov/cns/default.asp","News","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=750,height=550")
}
function cityvideo(URLaddress) {
window.open(URLaddress,"CityVideo","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,top=20,left=20,width=450,height=360")
}
function cmo(URLaddress) {
window.open(URLaddress,"cmoWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=600,height=400");
}
function cpi() {
document.location.href='http://www.rockymountnc.gov/cip.html';
}
function dnews() {
window.open("http://www.rockymountnc.gov/downtown/press/default.asp","News","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=750,height=550")
}
function event(URLaddress) {
window.open(URLaddress,"eventWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=0,width=650,height=500");
}
function firecal() {
window.open("http://www.rockymountnc.gov/fire/event/default.asp","calWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=800,height=580");
}
function formHandler() {
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
function holidays() {
window.open("http://www.rockymountnc.gov/holidays.html","notice2Window","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=0,width=600,height=400");
}
function jobs() {
window.open("http://199.72.233.2/cityjob/user/jobs.asp","Jobs","toolbar=1,location=0,status=0,menubar=1,scrollbars=1,resizable=1,top=0,left=0,width=760,height=600")
}
function municode() { window.open("http://www.municode.com/resources/gateway.asp?pid=11483&sid=33","NewWindow","toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,top=0,left=0")
}
function ldc() { window.open("http://library1.municode.com:80/default-test/template.htm?view=browse&doc_action=setdoc&doc_keytype=tocid&doc_key=add663501e72b7468ad8223b178a1e49&infobase=11483","NewWindow","toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,top=0,left=0")
}
function newsletter(UrlAddress){
UrlAddress=document.form2.issue[document.form2.issue.selectedIndex].value;
window.open(UrlAddress);
}
function newwindow(URLaddress) { window.open(URLaddress,"NewWindow","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=1,top=0,left=0")
}
function notice2(URLaddress) {
window.open(URLaddress,"notice2Window","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=0,width=600,height=500");
}
function notices(URLaddress) {
window.open(URLaddress,"News","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=750,height=550")
}
function orgchart() {
window.open("orgchart.html","NewWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=550,height=600")
}
function parkGUI() {
window.open("parks.html","NewWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=10,left=10,width=750,height=550");
}
function photoalbum(URLaddress) {
window.open(URLaddress,"photoWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=600,height=500");
}
function planboard() {
window.open("http://199.72.233.2/planboard/default.asp","Planboard","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=550,height=480")
}
function pbs() {
window.open("http://www.rockymountnc.gov/pbs/","PBS","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=550,height=480")
}
function recCalendar() {
window.open("http://www.rockymountnc.gov/parks/event/default.asp","NewWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=1,left=0,width=790,height=580");
}
function rmtour() {
window.open("rmtour.html","rmtourWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,top=10,left=10,width=500,height=450");
}
function tourlaunch() {
window.open("../imperialcentre/tour/tourgui.html","tourWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width=700,height=550");
}
function twirm(URLaddress) {
window.open(URLaddress,"Twirm","toolbar=0,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=700,height=450")
}
function util(URLaddress) {
window.open(URLaddress,"utilWindow","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=670,height=550");
}
function video(URLaddress) {
window.open(URLaddress,"videoWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=10,left=10,width=450,height=350");
}
function weather(UrlAddress){
UrlAddress=document.form2.month[document.form2.month.selectedIndex].value;
window.open(UrlAddress);
}
function webmap(URLaddress) {
 window.open(URLaddress,"webMap","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,top=0,left=0,width=750,height=600")
}
function site(UrlAddress) { window.open(UrlAddress,"SiteWindow","toolbar=1,location=0,status=0,menubar=1,scrollbars=1,resizable=0,top=0,left=0,width=700,height=550")
}
if (document.images) 
{
   img1 = new Image();
   img2 = new Image();
   img3 = new Image();
   img4 = new Image();
   img5 = new Image();
   img6 = new Image();
   img7 = new Image();
   img8 = new Image();
   img9 = new Image();
   img10 = new Image();
   img11 = new Image();
   img12 = new Image();
   img1.src = "../links/home-off.gif";
   img2.src = "../links/home-on.gif";
   img3.src = "../links/citybeat-off.gif";
   img4.src = "../links/citybeat-on.gif";
   img5.src = "../links/government-off.gif";
   img6.src = "../links/government-on.gif";
   img7.src = "../links/commres-off.gif";
   img8.src = "../links/commres-on.gif";
   img9.src = "../links/localdev-off.gif";
   img10.src = "../links/localdev-on.gif";
   img11.src = "../links/pubsafety-off.gif";
   img12.src = "../links/pubsafety-on.gif";
}
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}