//(c) All rights reserved to RestorationSOS.com

<!--
function sosCheck(){
	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;
	}

	// re-format the phone number the way you *WANT* it in the DB?
	//frm.phone.value = "(" + ph.substring(0,3) + ") " + ph.substring(3,6) + "-" + ph.substring(6);
	//return true;

	//if (!(frm.phone.value.search (/^[0-9-" "]{10,20}$/) > -1)) {
		//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;
	}

	//if (frm.zipCode.value == "" && frm.city.value == "" && frm.state.value == "") {
		//alert('Please Enter Zip Code OR City and State');
		//frm.zipCode.focus()
		//return false;
		//}

	//if (frm.zipCode.value == "") {
		//if (frm.city.value == "") {
			//alert('Please Enter a Valid City');
			//frm.city.focus();
			//return false;
			//}

		//if (!(frm.state.options[frm.state.selectedIndex].value)) {
			//alert('Please Select a State');
			//frm.state.focus();
			//return false;
			//}
		//}
	//else {
		//if (!(frm.zipCode.value.search (/^[0-9]{5}$/) > -1)) {
			//alert('Please Enter a Valid Zip Code');
			//frm.zipCode.focus()
			//return false;
			//}
		//}
}
//-->

<!--
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;
			}
		}
	}
}
//-->

<!--
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);
}
//-->

// 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)
}
//-->
