/*window.onresize=resize;
function resize(){
self.location.href=self.location.href;
}*/

if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();

// CALL TO CORRECT DIRECTORY BELOW
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.firstcherokeestate.com/images/"
sitedir="http://www.firstcherokeestate.com/site/"
securedir="http://www.firstcherokeestate.com/site/"
homedir="http://www.firstcherokeestate.com/"
}
else if(window.securepage)
{
imgdir="https://www.firstcherokeestate.com/images/"
sitedir="http://www.firstcherokeestate.com/site/"
securedir="https://www.firstcherokeestate.com/site/"
homedir="http://www.firstcherokeestate.com/"
}
// CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
function makeNavImage(name,width,height){
this.name_on="nav-" + name +"-on.gif";
this.name_off="nav-" + name +"-off.gif";
this.width=width;
this.height=height;
this.newimage_on = new Image(width,height);
this.newimage_on.src = imgdir + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = imgdir + this.name_off;
}

var nav_heights=24;

var navitems = new Array();
navitems["demo"] = new makeNavImage("demo",41,26);
navitems["register"] = new makeNavImage("register",52,26);
navitems["info"] = new makeNavImage("info",33,26);
navitems["fp"] = new makeNavImage("fp",119,26);
navitems["home"] = new makeNavImage("home",59,nav_heights);
navitems["about"] = new makeNavImage("about",80,nav_heights);
navitems["personal"] = new makeNavImage("personal",134,nav_heights);
navitems["business"] = new makeNavImage("business",136,nav_heights);
navitems["mortgages"] = new makeNavImage("mortgages",94,nav_heights);
navitems["other"] = new makeNavImage("other",115,nav_heights);
navitems["rates"] = new makeNavImage("rates",103,nav_heights);
navitems["faq"] = new makeNavImage("faq",54,nav_heights);

function img_act(imgName){
document[imgName].src = navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
document[imgName].src = navitems[imgName].newimage_off.src;
}
// ROLLOVER CODE ABOVE

// OTHER FUNCTIONS BELOW
function openWin(url,name,width,height,options){
var n = name;
var w = width;
var h = height;
var o = options;
n = (n==null)?"_blank":n;
w = (isNaN(w) || w==null)?700:w;
h = (isNaN(h) || h==null)?600:h;
o = (o==null)?"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1":(o.indexOf(",")!=0)?","+o:o;

var posX = Math.ceil((parseInt(screen.width) - w) / 2);
var posY = Math.ceil((parseInt(screen.height) - h) / 2);
aWindow = window.open(url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

function open_apps(nameofapp){
self.location.href = "https://www.firstcherokeestate.com/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function openIB(page){
if (page=="demo") self.location.href = homedir+"index.html?demo";
else if (page=="register") self.location.href = "https://www.firstcherokeestate.com/onlineserv/HB/STDReg.cgi";
else self.location.href = homedir+"index.html";
//else self.location.href = "https://www.firstcherokeestate.com/onlineserv/HB/Signon.cgi";
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function openCM(type){
    if(type == ""){
self.location.href="https://www.firstcherokeestate.com/onlineserv/CM/";
}

    else if(type == "demo"){
self.location.href="http://www.cmdemo.com/customer_demo/index.html";
}
    else{
self.location.href="https://www.firstcherokeestate.com/onlineserv/CM/";
}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


 function showWarning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<h3>Third Party Site Disclaimer</h3><br />By accessing the noted link you will be leaving your financial institution\'s website and entering a website hosted by another party. Your financial institution has not approved this as a reliable partner site.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of your financial institution\'s website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of your financial institutions.';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+url+'">Continue</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}

function showWarningApproved(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<h3>Third Party Site Disclaimer</h3><br />By accessing the noted link you will be leaving your financial institution\'s website and entering a website hosted by another party. Your financial institution has approved this as a reliable partner site. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of your financial institution\'s website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of your financial institution\'s.';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+url+'">Continue</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}

document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: center; position:absolute; margin:25% 25%; border: thin solid #1A448E; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=0A234F,offX=7,offY=8,positive=true); "></div>');



///////////////////////////       Random Picture Script added :: 200-41121      //////////////////////////////////////////////////////



var imagenumber = 5 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "../images/photo-local-canton-courthou.jpg"
images[2] = "../images/photo-local-canton-gazebo.jpg"
images[3] = "../images/photo-local-mariettafountai.jpg"
images[4] = "../images/photo-local-woodstockdepot.jpg"
images[5] = "../images/photo-branch.jpg" 
var image = images[rand1]






