var browder = navigator.appName;
function imgChange(img_name,src_name)
{	
	document.images[img_name].src = src_name;	
}

var count = 0;
function checkHeight()
{
	var browder = navigator.appName;
	var wrap = document.getElementById("wrap");
	//var bgRight = document.getElementById('bg_right');
	//var bgRightHeight = bgRight.offsetHeight;
	var wrapHeight = wrap.offsetHeight;
	var wrapWidth = wrap.offsetWidth;
	var gotop = document.getElementById('gotop');
	
	if(browder == "Microsoft Internet Explorer"){
	var pagechack = document.URL.match("001_index.html");
	}else{
	var pagechack = document.URL.split("/");
	}
	
	

	
//if(document.URL.indexOf("006_voicemail.html")>=0 || document.URL.indexOf("006_chggreeting-cp.html")>=0 ||document.URL.indexOf("006_holiday_greeting.html")>=0){
//006 voice mail pages


/*if(navigator.userAgent.indexOf("Safari")>=0 || navigator.userAgent.indexOf("Chrome")>=0){
	if(document.getElementById("mailbox_h3_mb")){
	var mailbox_h3_mb = document.getElementById("mailbox_h3_mb");
	var mailbox_h3_mb1 = document.getElementById("mailbox_h3_mb1");
	var support_btns = document.getElementById("support_btns");
	with(support_btns){
		style.marginTop = -77 +"px"
		}
	
	with(mailbox_h3_mb){
		style.marginTop = -11 + "px";
		style.marginLeft = 450 +"px";
		style.fontSize = 0.9 + "em";
		}
		
	with(mailbox_h3_mb1){
		style.marginLeft = 450 +"px";
		style.fontSize = 0.9 + "em";
		}
}
	}else{
if(document.getElementById("mailbox_h3_mb")){
	var mailbox_h3_mb = document.getElementById("mailbox_h3_mb");
	var mailbox_h3_mb1 = document.getElementById("mailbox_h3_mb1");
	var support_btns = document.getElementById("support_btns");
	with(support_btns){
		style.marginTop = -77 +"px"
		}
	
	with(mailbox_h3_mb){
		style.marginTop = -11 + "px";
		style.marginLeft = 450 +"px";
		style.fontSize = 0.9 + "em";
		}
		
	with(mailbox_h3_mb1){
		style.marginLeft = 450 +"px";
		style.fontSize = 0.9 + "em";
		}
}
	}*/
// end voice mail pages


//for Chrome
/*if(navigator.userAgent.indexOf("Chrome") != -1 ||navigator.userAgent.indexOf("Safari") != -1){
	if(document.URL.indexOf("006_mailbox.html") != -1){
		//alert("asdfasd");
		var boxes = new Array();
		boxes[0] = document.getElementById("box1");
		boxes[1] = document.getElementById("box0");
		boxes[2] = document.getElementById("box2");
		boxes[3] = document.getElementById("box3");
		boxes[4] = document.getElementById("box4");
		boxes[5] = document.getElementById("box5");
		boxes[6] = document.getElementById("box6");
		boxes[7] = document.getElementById("box7");
		boxes[8] = document.getElementById("box8");
		if(boxes[8] != null){
		for(i=1; i<8; i++){
		with(boxes[i]){
			style.marginTop = -60+ "px";
			style.marginBottom = -40 + "px";
			style.paddingTop = 10+ "px";
			//style.lineHeight = 3+ "px";
			}//with
		with(boxes[i].childNodes[2]){
			style.paddingBottom = 20 + "px";
			}//with
		}//for loop
		
		}else{//if(bosxes[0])
			setTimeout(delay,100)
		}//else
		}//if URL
	}//if navigator
	*/
function delay(){
	if(navigator.userAgent.indexOf("Chrome") != -1 ||navigator.userAgent.indexOf("Safari") != -1){
	if(document.URL.indexOf("006_mailbox.html") != -1){
		//alert("asdfasd");
		var boxes = new Array();
		boxes[0] = document.getElementById("box1");
		boxes[1] = document.getElementById("box0");
		boxes[2] = document.getElementById("box2");
		boxes[3] = document.getElementById("box3");
		boxes[4] = document.getElementById("box4");
		boxes[5] = document.getElementById("box5");
		boxes[6] = document.getElementById("box6");
		boxes[7] = document.getElementById("box7");
		boxes[8] = document.getElementById("box8");
		if(boxes[8] != null){
		for(i=1; i<8; i++){
		with(boxes[i]){
			style.marginTop = -60+ "px";
			style.marginBottom = -40 + "px";
			style.paddingTop = 10+ "px";
			//style.lineHeight = 3+ "px";
			}//with
		with(boxes[i].childNodes[2]){
			style.paddingBottom = 20 + "px";
			}//with
		}//for loop
			}//if URL
	}
	}//if navigator
	}//delay()
//end Chrome

//for Safari
if(navigator.userAgent.indexOf("Safari") >= 0){
	if(document.getElementById("sub_voice")){
		var sub_voice = document.getElementById("sub_voice")
		with(sub_voice){
			style.marginTop = -152 + "px";
			}
		}//if URL
	}//if navigator
	
	if(navigator.userAgent.indexOf("Chrome") >= 0){
	if(document.getElementById("sub_voice")){
		var sub_voice = document.getElementById("sub_voice")
		with(sub_voice){
			style.marginTop = -146 + "px";
			}
		}//if URL
	}//if navigator

//end Safari


if(browder != "Microsoft Internet Explorer"){
	
if(pagechack.indexOf("001_index.html") == -1){
	var pushing = document.getElementById('push');
	
	if(pushing.offsetHeight < 400)
	{
		pushing.style.height = 800+'px'; 	
	}
}
}else if(browder == "Microsoft Internet Explorer"){
	
	if(document.URL.indexOf("001_index.html") == -1){
	var pushing = document.getElementById('push');
	
	if(pushing.offsetHeight < 400)
	{
		pushing.style.height = 400+'px'; 	
	}//if pushing
	}//else
}//end if(browder)

	if(gotop){
	if(wrapHeight > window.screen.availHeight)
	{	
		//gotop.style.fontSize = 14+'px';
		gotop.innerHTML = '<a id="gotopro" href="#top" style="color:#3c3533; font-size:.8em; cursor:pointer;" onmouseover="this.style.color=\'#83408e\'" onmouseout="this.style.color=\'#3c3533\'">go top</a>';
	}
	
	else if(wrapHeight < window.screen.availHeight)
	{
		gotop.innerHTML = "";	
	}
}

//for IE 6
if(window.attachEvent) window.attachEvent('onload',fixPosBtm);
function fixPosBtm(){
if(navigator.appVersion.indexOf('MSIE 6.0') >= 0){
//if(document.URL.indexOf("006_mailbox.html") >= 0){

	var gotop = document.getElementById("gotop");
		//alert(gotop);

/*	with(btm){
		style.marginTop = 0 + "px";
		}*/
	
	
	//}//if 006_mailbox.html	
}//if MSIE 6.0
}
//for IE 6

//for IE 7
if(window.attachEvent) window.attachEvent('onload',boxPos);

function boxPos(){
if(navigator.appVersion.indexOf('MSIE 7.0') >= 0 ||navigator.appVersion.indexOf('MSIE 8.0') >= 0){
if(document.URL.indexOf("006_mailbox.html") >= 0){
var content_boxes = document.getElementById("content_boxes");

with(content_boxes){
	style.marginTop = 90 + "px"
	
	}
}//if MSIE 7.0
}
}
//for IE 7

}//end checkHeight()

function mailbocHeight()
{
	var currHeight = setTimeout(checkHeight,50);
	
}

/*if(navigator.appName.indexOf("Microsoft Internet Explorer") == -1){*/
var whileFix = setTimeout(mailbocHeight,100);
/*}else{
	var whileFix = setInterval(mailbocHeight,100);
	}*/
if(browder == "Microsoft Internet Explorer"){
window.document.onclick = function(){
	mailbocHeight();
	}
	
if(document.URL.indexOf("006_pri_Telephone_set.html") >= 0){
	window.attachEvent("onscroll",bgright);
	function bgright(){
			var wrap = document.getElementById("wrap");
	var bgRight = document.getElementById('bg_right');
	var bgRightHeight = bgRight.offsetHeight;
	var wrapHeight = wrap.offsetHeight;
		bgRight.style.height = wrapHeight+'px';
		}
	
	}//if "006_telephone_change_name.html"

if(document.URL.indexOf("006_support.html") >= 0){
	window.attachEvent("onload",pos);
	function pos(){
	var btm = document.getElementById("btm");
	with(btm){
		style.marginTop =-19 + "px";
		}
	}

	
	}//if	
	
}


function imgName(img)
{
	var theImg = document.getElementById(img);
	theImg.style.borderColor = "#83408e";
	
	if(this.addEventListener) {this.addEventListener("mouseout",borderWhire,false);}
	else if(document.attachEvent) {document.attachEvent("onmouseout",borderWhire);}
	
	function borderWhire(){
		theImg.style.borderColor = "#ffffff";
		}
}

function apperDiv(){
	var obj = document.getElementsByTagName("body").item(0);
	
	if(document.getElementById("need_help_div") == null){
	var need_help = document.createElement("div");
	with(need_help){
		id = "need_help_div";
		neme = "need_help_div";
		innerHTML = "<strong>Feel free to call or email us for any inquiries or quick and easy tech support!</storng>";
		style.width = 250 + "px";
		style.fontSize = .75 + "em";
		style.zindex = 8;
		style.backgroundColor = "#83408e";
		style.position = "absolute";
		style.top = 5 + "px";
		style.left = 260 + "px";
		style.color = "white";
		style.fontFamily = "Verdana, Arial, Helvetica, sans-serif";
		style.padding = 5 + "px";
		
		obj.appendChild(need_help);
		
		}//end with
	}
	
	}//end function apperDiv

function deleteDiv(){
	var need_help = document.getElementById("need_help_div");
	need_help.parentNode.removeChild(need_help);
	}

function forMac(){
	if(navigator.platform.indexOf('MacIntel')>-1){
		if(navigator.userAgent.indexOf('Firefox')>-1){
		var obj0 = document.getElementById('tel_field0_mac');
		var obj1 = document.getElementById('tel_field1_mac');
		var obj2 = document.getElementById('tel_field2_mac');
		var obj3 = document.getElementById('tel_field2');
		var obj4 = document.getElementById('tel_field3');
		with(obj0){
			style.marginLeft = 118 +"px";
			}
		
		with(obj1){
			style.marginLeft = 108 +"px";
			}
		
		with(obj2){
			style.marginLeft = 63 +"px";
			}
			
		with(obj3){
			style.marginLeft = 103 +"px";
			}
			
		with(obj4){
			style.marginLeft = 112 +"px";
			}
		}
	}
	}