N   = (document.layers) ? true:false;                 // netscape 4
I   = (document.all) ? true:false;                    // ie4+
DOM = ((document.getElementById)&&(!I))?true:false;   // ns6 etc.
MAC = (navigator.platform=="MacPPC")?true:false;   // Mac
SAFARI = (navigator.userAgent.indexOf('Safari')>-1)?true:false;   // Mac
Ixp   = (document.all)&&(navigator.userAgent.indexOf('Windows NT 5.1')>-1) ? true:false;                    // windows xp 
IE7   = (document.all)&&(navigator.userAgent.indexOf('MSIE 7')>-1) ? true:false;                    // IE7

//jump menus
function jumpTo(targ,sel){ 
  eval(targ+".location='"+sel.options[sel.selectedIndex].value+"'");
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0 revised by FMI
	if(selObj.options[selObj.selectedIndex].text.indexOf('Choose')>-1){return}
  else{eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;}
}
//Search clear quotes
function clearQuotes(d){
d.keywords.value=d.keywords.value.replace(/["]/g,"");
return 
}
//Script for Go Back button
function goBack () {
window.history.go (-1);
}
//standard pop-up
function stdPop(where,title,w,h){
	window.open(where, title, 'toolbar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top=100,left=100')
}
//user groups pop-up
function userPop(where,title,w,h,t,l){
	window.open(where, title, 'toolbar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+t+',left='+l+'')
}
//OverView Pop-up
function overPop(){
	window.open('/downloads/overview/overview.html', 'Overview', 'toolbar=no,scrollbars=no,resizable=yes,width=800,height=600,top=100,left=100')
}
function clik(){
}
//Special Charactor Removal
function specialChar(field) {
        var re=/[*]|["]|[']/g;
		adjusted=field.value.replace(re, "");field.value=adjusted;
}
//Techinfo search functions
var ti='http://www.filemaker.com/ti/'; 
function smartClear(formText){
	if (formText.value=='Type search words here'||formText.value=='Type article number here')formText.value=''
}
function goArtNum(){
		var num=document.artNum.num
		if (isNaN(num.value)||num.value.length!=6){
			alert('Please type the 6 digit article number.');}
	else eval("location='"+ti+num.value+".html'")
}
function validSurvey(d){
	var e=new Date()
	var year=e.getTime()+(365*24*60*60*1000)
	e.setTime(year)
	if (document.cookie.indexOf(d.survey.value)>-1)(d.key.value=2)
	if (document.cookie.indexOf(d.survey.value)<0)(d.key.value=1)
	if (document.cookie==''){document.cookie="key="+d.survey.value+"; expires=" + e.toGMTString()}
	else {if(document.cookie.indexOf(d.survey.value)<0){document.cookie+=d.survey.value+"; expires=" + e.toGMTString()}return}
}
function validate(d){
	var e=new Date()
	var year=e.getTime()+(365*24*60*60*1000)
	e.setTime(year)
	if (document.cookie.indexOf(d.survey.value)>-1)(d.key.value=2)
	if (document.cookie.indexOf(d.survey.value)<0)(d.key.value=1)
	if (document.cookie==''){document.cookie="key="+d.survey.value+"; expires=" + e.toGMTString()}
	else {if(document.cookie.indexOf(d.survey.value)<0){document.cookie+=d.survey.value+"; expires=" + e.toGMTString()}return}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//ALL NEW
// JavaScript Document
var obj;
var objChild;
var homepage = false; /* triggers setFeatureBkgdImage() only on www/index */


function init() 
{
if (homepage) {
setFeatureBkgdImage()
}
	cssjsmenu('globalHelp');
	cssjsmenu('globalNav');//alert('Done');
	MM_preloadImages('/images/globalnav/hover_bg_left.png','/images/globalnav/hover_bg_right.png')
}
function setMouseOverStyles(obj){
	//I added which turns on the style to match the rollover effect on the nested list			 
	
			  //New delete--obj.childNodes[0].style.backgroundImage = 'url(http://www.filemaker.com/images/bg/global_pulldown_sm_top_left.gif)';
			  //New delete--obj.childNodes[0].style.backgroundPosition = 'left top';
			
			// obj.style.borderTop = '#8e8e8f solid 1px';
			//alert(obj.nodeName)
			//orgBgImg= obj.style.backgroundImage;
			//$('searchbox').value=orgBgImg
			   obj.style.backgroundImage = 'url(/images/globalnav/hover_bg_right.png)';
			    obj.style.backgroundPosition = 'right top';
			   obj.style.backgroundRepeat =  'no-repeat';
			  //New delete--obj.childNodes[0].style.backgroundColor = '#30649D';
			  obj.childNodes[0].style.backgroundImage = 'url(/images/globalnav/hover_bg_left.png)';
			  obj.childNodes[0].style.backgroundPosition = 'left top';
			  obj.childNodes[0].style.backgroundRepeat =  'no-repeat';
			  obj.childNodes[0].style.color = '#FFFFFF';
			  // obj.childNodes[0].style.borderTop = 'red solid 1px'
			  //New delete--obj.style.backgroundImage = 'url(http://www.filemaker.com/images/bg/global_pulldown_sm_top_r.gif)';
			  //New delete--obj.style.backgroundPosition = '100% 0';
			  //New delete--if(I&&!MAC){obj.style.backgroundPosition = '100% 0px';}
			  	  obj.style.backgroundPosition = '89% 0';
			  if(IE7){obj.style.backgroundPosition = '89% 3';}
		
			 //New delete-- obj.style.backgroundRepeat = 'no-repeat';
}
function setMouseOutStyles(){
//Added which turns off the style implemented by the js
				//New delete--obj.childNodes[0].style.backgroundColor = 'white';
				//New delete--obj.childNodes[0].style.color = '#313131';
				//New delete--obj.style.backgroundImage = 'url(none)';
				//New delete--obj.childNodes[0].style.backgroundImage = 'url(none)';
				objChild.style.visibility = 'hidden';
				obj.style.border = '#ffffff solid 0px';
				
				
				//NEW
				obj.style.backgroundImage = 'url(none)';
				obj.childNodes[0].style.color ='#747576'
				obj.childNodes[0].style.backgroundImage = 'url(none)'
				if(!SAFARI){}//obj.style.borderBottom = '#ffffff solid 0px'}
				//New delete--if(obj.parentNode.id=="globalHelp"){
					//New delete--obj.childNodes[0].style.color = '#999999'}
//End add
}
function elementContains(elmOuter, elmInner){
  while (elmInner && elmInner != elmOuter)
  {elmInner = elmInner.parentNode;}
  if (elmInner == elmOuter){
    return true;}
  return false;
}
function getPageXY(elm)
{
  var point = { x: 0, y: 0 };
  while (elm)
  {
		point.x += elm.offsetLeft;
    	point.y += elm.offsetTop;
    	elm = elm.offsetParent;
	 }
return point;
}
function setPageXY(elm, x, y){
  var parentXY = {x: 0, y: 0 };
  if (elm.offsetParent){
    parentXY = getPageXY(elm.offsetParent);}
	if(DOM){y+=2}//Mine to give some distance from the parent li
	elm.style.left = (x) + 'px';elm.style.top = (y) + 'px';
}
function cssjsmenu(menuid){
  var i;
  var j;
  var node;
  var child;
  var parent;
  if (!document.getElementById)
  {
    return true;
  }
  var version;
  var offset;
  offset = navigator.userAgent.indexOf('Opera');
  if (offset != -1){
    version = parseInt('0' + navigator.userAgent.substr(offset + 6), 10);
		if (version < 7){
      return true;}
  }
var menudiv = document.getElementById(menuid);
  // ul
  var ul = new Array();
  for (i = 0; i < menudiv.childNodes.length; i++){
	node = menudiv.childNodes[i];
    if (node.nodeName.toUpperCase() == 'UL'){
      ul[ul.length] = node;}
  }
  // ul > li
  var ul_gt_li = new Array();
  for (i = 0; i < ul.length; i++){
    node = ul[i];for (j = 0; j < node.childNodes.length; j++)
    {
      child = node.childNodes[j];
      if (child.nodeName.toUpperCase() == 'LI'){
        ul_gt_li[ul_gt_li.length] = child;
        child.style.display = 'inline';
        child.style.listStyle = 'none';
        child.style.position = 'static';
		 if(!SAFARI){child.style.borderBottom = '#ffffff solid 0px'} }
    }
  }
  // ul > li > ul
  var ul_gt_li_gt_ul = new Array();
  for (i = 0; i < ul_gt_li.length; i++)
  {
    node = ul_gt_li[i];
    for (j = 0; j < node.childNodes.length; j++)
    {
      child = node.childNodes[j];
      if (child.nodeName.toUpperCase() == 'UL')
      {
        ul_gt_li_gt_ul[ul_gt_li_gt_ul.length] = child;
 
 		parent = child.parentNode; 
        parent.onmouseover = function (e)
        {
          var i;
          var child;
          var point;
          // stop the pure css hover effect
          this.style.paddingBottom = '0';
          for (i = 0; i < this.childNodes.length; i++)
          {
            child = this.childNodes[i];
            if (child.nodeName.toUpperCase() == 'UL')
            {
              point = getPageXY(this);
              setPageXY(child, point.x, point.y + this.offsetHeight);
              child.style.visibility = 'visible';
			 setMouseOverStyles(this);}
			}
          return false;
        };
        parent.onmouseout = function (e)
        {
          var relatedTarget = null;
          if (e){//Nescape&Mozilla&Safari 
		  
            relatedTarget = e.relatedTarget;
	    	if (navigator.product == 'Gecko' && navigator.platform.indexOf('Linux') != -1 && !relatedTarget){
	      		relatedTarget = e.originalTarget;}
          }
          else if (window.event){//IE
          	relatedTarget = window.event.toElement;}
          	if (elementContains(this, relatedTarget)){
            return false;}
          var i;
          var child;
          for (i = 0; i < this.childNodes.length; i++)
          {
            child = this.childNodes[i];
            if (child.nodeName.toUpperCase() == 'UL')
            {
					obj=this;
					objChild=child;
					setMouseOutStyles();
            }
          }
          return false;
        };
      }
    }
  }
  return true;
}
function featureTour(){
	window.open('/products/fm7_tour_nc/intro.html','FeatureTour','toolbar=no,scrollbars=no,resizable=yes,width=710,height=310,top=100,left=100')
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//---------------Needs cleaning----------------
var interval=200,b,selectObjActive=false
//------------------------End of cleaning-------
window.onload=init;
var clips=new Array();
clips[0]="/downloads/quicktime/customer_ilm_high.mov"
clips[1]="/downloads/quicktime/customer_prog_solutions_high.mov"
clips[2]="/downloads/quicktime/customer_herrera_high.mov"
clips[3]="/downloads/quicktime/customer_ilm_low.mov"
clips[4]="/downloads/quicktime/customer_prog_solutions_low.mov"
clips[5]="/downloads/quicktime/customer_herrera_low.mov"
clips[6]="/downloads/quicktime/customer_deutsch_high.mov"
clips[7]="/downloads/quicktime/customer_deutsch_low.mov"
clips[8]="/downloads/quicktime/customer_dottax_high.mov"
clips[9]="/downloads/quicktime/customer_dottax_low.mov"
clips[10]="/downloads/quicktime/customer_willoway_high.mov"
clips[11]="/downloads/quicktime/customer_willoway_low.mov"
function popClip(whichClip){
	window.open(clips[whichClip], "Customer_Video", 'toolbar=no,scrollbars=yes,resizable=yes,width=340,height=260,top=100,left=100')
}
//FM7 OverView Pop-up
function fm7OverPop(){
	window.open('/downloads/fm7_overview/index.html', 'Overview', 'toolbar=no,scrollbars=no,resizable=yes,width=750,height=450,top=100,left=100')
}
function fmp8aTour(){
	window.open('/tours/fmp8a/upg_01.html','FeatureTour','toolbar=no,scrollbars=no,resizable=yes,width=720,height=360')
}
function fmp8Tour(){
	window.open('/tours/fmp8n/nuf_01.html','FeatureTour','toolbar=no,scrollbars=no,resizable=yes,width=720,height=360')
}
function fms8Tour(){
	window.open('/tours/fms8/serv_01.html','FeatureTour','toolbar=no,scrollbars=no,resizable=yes,width=720,height=360')
}
function fmp8TopTour(){
	window.open('/tours/fmp8e/existing_01.html','FeatureTour','toolbar=no,scrollbars=no,resizable=yes,width=720,height=360')
}
function fmp8Top10Demo() {
	window.open('/downloads/flash/fmp8top10/fm8_top_10.html','FlashTour','toolbar=no,scrollbars=no,resizable=yes,width=1030,height=650')
}
function fmp9NewUserTour() {
	window.open('/tours/bmb_fmp.html','FlashTour','toolbar=no,scrollbars=no,resizable=yes,width=1030,height=650')
}
function fmp8NewUserTour() {
	window.open('/downloads/flash/fm8_new_user_demo/index.html','FlashTour','toolbar=no,scrollbars=no,resizable=yes,width=1030,height=650')
}
function linkTo(a)
{
window.opener.location=a;
self.close();
}
/* ****** upgrade selector script ***** */
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
var answer=new Array();
answer[0]='<b>FileMaker Pro 8 Upgrade or FileMaker Pro Advanced 8</b> <a href="/store/">Buy now</a>'
answer[1]='<b>FileMaker Pro 8 Education</b> <a href="/purchase/store/education.html">Learn more</a>'
answer[2]='<b>FileMaker Pro 8 Upgrade (no bundles available for FMP8)</b> <a href="/store/">Buy now</a>'
answer[3]='<b>FileMaker Pro 8 Full</b> <a href="/store/">Buy now</a>'
answer[4]=''
answer[5]='<b>FileMaker Pro 8 5pk Upgrade</b> <a href="/store/">Buy now</a>'
answer[6]='<b>FileMaker Pro 8 5pk Education</b> <a href="/purchase/store/education.html">Learn more</a>'
answer[7]=''
answer[8]='<b>FileMaker Server 8 Upgrade</b> <a href="/store/">Buy now</a>'
answer[9]='<b>FileMaker Server 8 Full</b> <a href="/store/">Buy now</a>'
answer[10]='<b>FileMaker Server 8 Education</b> <a href="/purchase/store/education.html">Learn more</a>'
answer[11]=''
answer[12]='<b>FileMaker Server 8 Advanced</b> <a href="/store/">Buy now</a>'
answer[13]='<b>FileMaker Server 8 Advanced Education</b> <a href="/purchase/store/education.html">Learn more</a>'
answer[14]='<b>FileMaker Server 8 Advanced (special pricing)</b> <a href="/store/">Buy now</a>'
answer[15]=''
answer[16]='<b>FileMaker Pro Advanced 8</b> <a href="/store/">Buy now</a>'
answer[17]='<b>FileMaker Pro Advanced 8 Education </b> <a href="/purchase/store/education.html">Learn more</a>'
answer[18]='<b>FileMaker Pro Advanced 8</b> <a href="/store/">Buy now</a>'
answer[19]=''
answer[20]='<b>FileMaker Mobile 8 Upgrade</b> <a href="/store/">Buy now</a>'
answer[21]='<b>FlleMaker Mobile 8 Education</b> <a href="/purchase/store/education.html">Learn more</a>'
answer[22]='<b>FileMaker Mobile 8 Full</b> <a href="/store/">Buy now</a>'
answer[23]=''
answer[24]='<b>FileMaker Volume License Agreement</b> <a href="/purchase/store/licensing.html">Learn more</a>'
answer[25]='<b>FileMaker Volume License Agreement</b> <a href="/purchase/store/licensing.html">Learn more</a>'
answer[26]='<b>FileMaker Volume License Agreement</b> <a href="/purchase/store/licensing.html">Learn more</a>'
;
function iHeartFM(selObj,that){
var a=MM_findObj(that)
var p=MM_findObj('currentProd');
a.innerHTML="&nbsp;"+answer[selObj[selObj.selectedIndex].value]
}
/*  end upgrade selector script */

/* Show / Hide Divs Toggle */
/* javascript used for showing and hiding the answers */

function toggle_one( id ) {
	var loc = document.getElementById( id );
	if( loc.className == 'hide' ) {
		loc.className = 'show';
	} else {
		loc.className = 'hide';
	}

	// change the class of the selected faq icon
	var button = id  + '-button';
	var loc_button = document.getElementById( button );
	if( loc_button.className == 'expanded' ) {
	 	loc_button.className = 'collapsed';
	} else {
	 	loc_button.className = 'expanded';
	}
}
/* end Show / Hide Divs Toggle */

/* Show / Hide ALL Divs Toggle */

function toggle_all( id ) {
	var allDivs = document.getElementById( 'faqs' ).getElementsByTagName( 'div' );
	for ( var i = 0; i < allDivs.length; i++ ) {
		if( allDivs[i].className == 'hide' ) {
		 	allDivs[i].className = 'show';
		} else {
		 	allDivs[i].className = 'hide';
		}
  }
  // change the icon of "show all answers"
	var loc_button = document.getElementById( 'show-all-button' );
	if( loc_button.className == 'arrow-expanded' ) {
	 	loc_button.className = 'arrow-collapsed';
	} else {
	 	loc_button.className = 'arrow-expanded';
	}
}
/* end Show / Hide ALL Divs Toggle */

/* Show / Hide Divs Toggle USING PROTOTYPE EFFECTS */
/* javascript used for showing and hiding the answers */

function swap( id ) {
	var loc = document.getElementById( id );
	if( loc.style.display == 'none' ) {
		new Effect.PhaseIn($(id));
	} else {
		new Effect.PhaseOut($(id));
	}

	// change the class of the selected faq icon
	var button = id + '-button';
	var loc_button = document.getElementById( button );
	if( loc_button.className == 'expanded' ) {
		loc_button.className = 'collapsed';
	} else {
		loc_button.className = 'expanded';
	}
}
function swap_all( ) {
	var allDivs = document.getElementById( 'fmsChart' ).getElementsByTagName( 'ul' );
	for ( var i = 0; i < allDivs.length; i++ ) {
		if( allDivs[i].style.display == 'none' ) {
			new Effect.PhaseIn(allDivs[i]);
		}	else {
		  new Effect.PhaseOut(allDivs[i]);
		}
	}
	// change the class of the selected faq icon
	var button = id + '-button';
	var loc_button = document.getElementById( button );
	if( loc_button.className == 'expanded' ) {
		loc_button.className = 'collapsed';
	} else {
		loc_button.className = 'expanded';
	}
}
