//(c) All rights reserved to RestorationSOS.com

<!--
function sosCheck(frm) {
	//var frm = document.getElementById("sos");

	if (!(frm.damage.options[frm.damage.selectedIndex].value)) {
		alert('Please Select the Damage Type');
		frm.damage.focus();
		return false;
		}

	if (frm.fullName.value.length<3) {
		alert('Please Enter a valid Full Name');
		frm.fullName.focus();
		return false;
		}

	var ph = frm.phone.value.replace( /[^\d]/g, "" );
	if (ph.length != 10) {
		alert("Please Choose a Valid Phone Number Including Area Code");
		frm.phone.focus();
		return false;
		}

	if(frm.email.value != "") {
		if (!(/^\w+([\.]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})$/.test(frm.email.value))) {
			alert('Please Enter a Valid eMail Address');
			frm.email.focus();
			return false;
			}
		}

	if (!(frm.zipCode.value.search (/^[0-9]{5}$/) > -1)) {
		alert('Please Enter a Valid Zip Code');
		frm.zipCode.focus()
		return false;
		}

	return true;
}
//-->

<!--
function goto(form) {
	var index=form.select.selectedIndex
	if (form.select.options[index].value != "0") {
		location=form.select.options[index].value;}}
//-->

<!--
function clearAllTabs(menu) {
	var aAnchor=document.getElementById('navcontainer'+menu).getElementsByTagName('a');
	var aDiv=document.getElementById('content'+menu).getElementsByTagName('div');
		for(var k=0; k<aAnchor.length; k++) {
			if(aAnchor[k].className='selected')
				aAnchor[k].className='';
			aDiv[k].style.display='none';
		}
}

function selectTab(menu, id) {
	var ov = parseInt(id) + 1;
    clearAllTabs(menu);
    document.getElementById('link'+id).className='selected';
    document.getElementById('tab'+id).style.display='inline';
    if(document.getElementById('link' + ov)){
		document.getElementById('link' + ov).className = 'overlap';
	}
	setCookie('tb'+menu, id, 100);
}

function setCookie(name, value, days, path, domain, secure) {
	var today = new Date();
	var expire = new Date();
	if (days==null || days==0) days=1;
	expire.setTime(today.getTime() + 3600000*24*days);

	document.cookie= name + "=" + escape(value) +
        ((expire) ? "; expires=" + expire.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }

	selectTab( name.substring(2,3), unescape(dc.substring(begin + prefix.length, end)) );
}


var tags = new Array( 'p', 'ul', 'ol', 'form', 'textarea', 'input' );
var pixelArray =  new Array('9','10','11','12','13','14','16','18');
var initSize = 2;

function setSize(inc,unit) {
	if (!document.getElementById)
		return;
	var size = initSize;
		size += inc;
	if (size < 0 ) {
		size = 0;
	}
	if (size > 6 ) {
		size = 6;
	}
	initSize = size;
	if(document.getElementById('content1')!=null){
		getFirstBox = document.getElementById('content1');
		for (i = 0 ; i < tags.length ; i++ ) {
			getallTagsFirst = getFirstBox.getElementsByTagName(tags[i]);
			for (k = 0 ; k < getallTagsFirst.length ; k++) {
				getallTagsFirst[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
			}
		}
	}

	if(document.getElementById('content2')!=null){
		getSecondBox = document.getElementById('content2');
		for (i = 0 ; i < tags.length ; i++ ) {
			getallTagsSecond = getSecondBox.getElementsByTagName(tags[i]);
			for (k = 0 ; k < getallTagsSecond.length ; k++) {
				getallTagsSecond[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
			}
		}
	}

	if(document.getElementById('pageContent')!=null){
		getPageContent = document.getElementById('pageContent');
		for (i = 0 ; i < tags.length ; i++ ) {
			getallTagsContent = getPageContent.getElementsByTagName(tags[i]);
			for (k = 0 ; k < getallTagsContent.length ; k++) {
				getallTagsContent[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
			}
		}
	}
}

//call onload function
window.onload = function() {
	//setInterval('updateTime( )', 1000);
	getCookie('tb1');
	getCookie('tb2');
	getCookie('tb3');
	getCookie('tb4');
}//end onload
//-->

// Flash Version Detector  v1.2.1
// documentation: http://www.dithered.com/javascript/flash_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)
// with VBScript code from Alastair Hamilton (now somewhat modified)

<!--
function isDefined(property) {
  return (typeof property != 'undefined');
}

var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 8;
   var agent = navigator.userAgent.toLowerCase();

   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }

	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') {
			for (var i = latestFlashVersion; i >= 3; i--) {
            if (flashPlugin.description.indexOf(i + '.') != -1) {
               flashVersion = i;
               break;
            }
         }
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   var doc = '<scr' + 'ipt language="VBScript"\> \n';
      doc += 'On Error Resume Next \n';
      doc += 'Dim obFlash \n';
      doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
      doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
      doc += '   If IsObject(obFlash) Then \n';
      doc += '      flashVersion = i \n';
      doc += '      Exit For \n';
      doc += '   End If \n';
      doc += 'Next \n';
      doc += '</scr' + 'ipt\> \n';
      document.write(doc);
   }

	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}

flashVersion_DONTKNOW = -1;
//-->

<!--
var obj='';
if (getFlashVersion() >= 5)
	obj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="46" height="44"><param name="movie" value="http://restorationsos.com/imgs/icon_rc.swf" /><param name="quality" value="high" /><embed src="http://restorationsos.com/imgs/icon_rc.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="46" height="44" /></object>';

var objHome='';
if (getFlashVersion() >= 5)
	objHome = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="46" height="46"><param name="movie" value="http://restorationsos.com/imgs/icon.swf" /><param name="quality" value="high" /><embed src="http://restorationsos.com/imgs/icon.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="46" height="46" /></object>';
//-->

<!--
function newWindow(url, name, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl
	win = window.open(url, name, winprops)
}
//-->

//function updateTime( ) {
	//var now = new Date();
	//now.setTime( now.getTime() + 9*60*1000 ); // 10 minutes * 60 seconds * 1000 milliseconds
	//var hr = now.getHours();
	//var ampm = hr >= 12 ? " PM" : " AM";
	//if ( hr > 12 ) hr -= 12;
	//if ( hr == 0 ) hr = 12;
	//var mn = now.getMinutes(); if ( mn < 10 ) mn = "0" + mn;
	//var sc = now.getSeconds(); if ( sc < 10 ) sc = "0" + sc;
	//var where = document.getElementById("CLOCK");
	//where.innerHTML = hr + ":" + mn + ":" + sc + ampm;
//}
//-->

<!--
onload=function() {
	document.getElementById("fullName").focus();
}
//-->
