 var ns4=(document.layers)?true:false;
var ie=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;
var safari=(navigator.userAgent.indexOf("Safari")!=-1)?true:false;
var ns6up=(navigator.userAgent.indexOf("Gecko")!=-1)?true:false;
var firefox=(navigator.userAgent.indexOf("Firefox")!=-1)?true:false;
var opera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
var ie_mac =(ie !=false && navigator.appVersion.indexOf("Macintosh")!=-1)?true:false;
var mac_other =(ie != true && navigator.appVersion.indexOf("Macintosh")!=-1)?true:false; 
var w3c=(document.getElementById)?true:false;
//added in case want to inc meta tags at later date
function meta_tags () {

}

function select_css () {
    if (w3c) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/w3c.css">');
    if (ie) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/ie.css">');
	if (ns4) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/ns4.css">');
	if (ns6up) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/ns.css">');
	if (firefox) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/ns.css">');
	if (ie_mac) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/ie_mac.css">');
    if (mac_other) document.writeln('<link type="text/css" rel="stylesheet" href="http://www.genesifter.net/web/scripts/ns.css">');
}

	
//added in case want to inc footer at later date

function footer(){

}

function get_parentMenu(site,page_indx,link) {

    if (site == 'marketing') {		 
	    var home_url = new String('index.html'); 
		var prod_url =  new String('products.html');
		var tech_url =  new String('technology.html');
		var news_url =  new String('news.html');
		var trial_url =  new String('trial.html');
	  
       var home = ["home", home_url, "home_lk","home_lkActive","Home"];
       var products = ["products",prod_url,"products_lk","products_lkActive","Products"];
	   var technology = ["technology", tech_url,"technology_lk","technology_lkActive","Overview"];
	   var news = ["news",news_url,"news_lk","news_lkActive","News/Events"];
	   var trial = ["trial",trial_url,"trial_lk","trial_lkActive","Trial account"];	
	   var login = ["login","https://login.genesifter.net","login_lk","login_lkActive","Login"];
	  
       var section = [home, products, technology, news, trial, login];
	
       if (w3c) { 
          section[0][5] = new String('<div id="home" class="tab1"><a href='+home_url+' onMouseOver="highlight_tab(\'home_lk\');" onMouseOut="drop_hightlight(\'home_lkActive\');"><div class="main_tabs" id="home_lk"><a href='+home_url+' onMouseOver="highlight_tab(\'home_lk\');" onMouseOut="drop_hightlight(\'home_lkActive\');">Home</a></div></a></div>'); 
       	  section[1][5] = new String('<div id="products" class="tab1"><a href='+prod_url+' onMouseOver="highlight_tab(\'products_lk\');" onMouseOut="drop_hightlight(\'products_lkActive\');"><div id="products_lk"><a href='+prod_url+' onMouseOver="highlight_tab(\'products_lk\');" onMouseOut="drop_hightlight(\'products_lkActive\');">Products</a></div></a></div>'); 
       	  section[2][5] = new String('<div id="technology" class="tab1"><a href='+tech_url+' onMouseOver="highlight_tab(\'technology_lk\');" onMouseOut="drop_hightlight(\'technology_lkActive\');"><div class="main_tabs" id="technology_lk"><a href='+tech_url+' onMouseOver="highlight_tab(\'technology_lk\');" onMouseOut="drop_hightlight(\'technology_lkActive\');">'+technology[4]+'</a></div></a></div>'); 
       	  section[3][5] = new String('<div id="news" class="tab1"><a href='+news_url+' onMouseOver="highlight_tab(\'news_lk\');" onMouseOut="drop_hightlight(\'news_lkActive\');"><div class="main_tabs" id="news_lk"><a href='+news_url+' onMouseOver="highlight_tab(\'news_lk\');" onMouseOut="drop_hightlight(\'news_lkActive\');">News & Events</a></div></a></div>'); 
       	  section[4][5] = new String('<div id="trial" class="tab1"><a href='+trial_url+' onMouseOver="highlight_tab(\'trial_lk\');" onMouseOut="drop_hightlight(\'trial_lkActive\');"><div class="main_tabs" id="trial_lk"><a href='+trial_url+' onMouseOver="highlight_tab(\'trial_lk\');" onMouseOut="drop_hightlight(\'trial_lkActive\');">Trial account</a></div></a></div>'); 
       	  section[5][5] = new String('<div id="login" class="tab1"><a target="_new" href="https://login.genesifter.net"  onMouseOver="highlight_tab(\'login_lk\');" onMouseOut="drop_hightlight(\'login_lkActive\');"><div class="main_tabs" id="login_lk"><a target="_new" href="http://login.genesifter.net"  onMouseOver="highlight_tab(\'login_lk\');" onMouseOut="drop_hightlight(\'login_lkActive\');">Login</a></div></a></div>');  
    	
		  // create string with anchor
		  if (page_indx != 'nohlgt') {
              if (link == 'yes') {
	             section[page_indx][5] = new String('<div id='+section[page_indx][0]+' class="selected_tab1"><a href='+section[page_indx][1]+'>'+section[page_indx][4]+'</a></div>');
	       	  }                         
		   	  else {
	              section[page_indx][5] = new String('<div id='+section[page_indx][0]+' class="selected_tab1">'+section[page_indx][4]+'</div>');
	       	  }
	      }
    	  document.writeln('<div id="parent_menu">');
		  document.writeln(section[0][5]);
		  document.writeln(section[1][5]);
		  document.writeln(section[2][5]);
    	  document.writeln(section[3][5]);
		  document.writeln(section[4][5]);
		  document.writeln(section[5][5]);
		  document.writeln('</div>');
  	   }
    }
	else if (site == 'community') {

       var commHome = ["commHome","community.html","commHome_lk","commHome_lkActive","Home"];
       var dataCenter = ["dataCenter_home","dataCenter.html","dataCenter_lk","dataCenter_lkActive","Data Center"];

	  
       var section = [commHome,dataCenter];
	
       if (w3c) { 
    	 //section[0][5] = new String('<div id="commHome" class="tab1"><a href="'+commHome[1]+'" onMouseOver="highlight_tab(\''+commHome[2]+'\');" onMouseOut="drop_hightlight(\''+commHome[3]+'\');"><div id="'+commHome[2]+'"><a href="'+commHome[1]+'" onMouseOver="highlight_tab(\''+commHome[2]+'\');" onMouseOut="drop_hightlight(\''+commHome[3]+'\');">Home</a></div></a></div>');
    	 section[1][5] = new String('<div id="dataCenter_home" class="tab1"><a href="'+dataCenter[1]+'" onMouseOver="highlight_tab(\''+dataCenter[2]+'\');" onMouseOut="drop_hightlight(\''+dataCenter[3]+'\');"><div id="'+dataCenter[2]+'"><a href="'+dataCenter[1]+'" onMouseOver="highlight_tab(\''+dataCenter[2]+'\');" onMouseOut="drop_hightlight(\''+dataCenter[3]+'\');">Data Center</a></div></a></div>');	 
		 // create string with anchor
		  if (page_indx != 'nohlgt') {
              if (link == 'yes') {
	             section[page_indx][5] = new String('<div id='+section[page_indx][0]+' class="selected_tab1"><a href='+section[page_indx][1]+'>'+section[page_indx][4]+'</a></div>');
	       	  }                         
		   	  else {
	              section[page_indx][5] = new String('<div id='+section[page_indx][0]+' class="selected_tab1">'+section[page_indx][4]+'</div>');
	       	  }
	      }
    	  document.writeln('<div id="parent_menu">');
		  //document.writeln(section[0][5]);
		  document.writeln(section[1][5]);
		  document.writeln('</div>');
  	   }	
	
	}
	// for quickstart of genesifter product
	else if (site == 'quickstart') {
	
	
       var overview = ["home","qs_overview.html", "home_lk","home_lkActive","Overview"];
       var upload = ["products","qs_upload.html","products_lk","products_lkActive","Upload"];
	   var analysis = ["technology","qs_analysis.html","technology_lk","technology_lkActive","Analysis"];	
	   var section = [overview, upload, analysis];
	   
       section[0][2] = new String('<div id="home" class="tab1"><a href='+overview[1]+' onMouseOver="highlight_tab(\'home_lk\');" onMouseOut="drop_hightlight(\'home_lkActive\');"><div class="main_tabs" id="home_lk"><a href='+overview[1]+' onMouseOver="highlight_tab(\'home_lk\');" onMouseOut="drop_hightlight(\'home_lkActive\');">'+overview[4]+'</a></div></a></div>'); 
       section[1][2] = new String('<div id="products" class="tab1"><a href='+upload[1]+' onMouseOver="highlight_tab(\'products_lk\');" onMouseOut="drop_hightlight(\'products_lkActive\');"><div id="products_lk"><a href='+upload[1]+' onMouseOver="highlight_tab(\'products_lk\');" onMouseOut="drop_hightlight(\'products_lkActive\');">'+upload[4]+'</a></div></a></div>'); 
       section[2][2] = new String('<div id="technology" class="tab1"><a href='+analysis[1]+' onMouseOver="highlight_tab(\'technology_lk\');" onMouseOut="drop_hightlight(\'technology_lkActive\');"><div class="main_tabs" id="technology_lk"><a href='+analysis[1]+' onMouseOver="highlight_tab(\'technology_lk\');" onMouseOut="drop_hightlight(\'technology_lkActive\');">'+analysis[4]+'</a></div></a></div>'); 

	   if (page_indx != 'nohlgt') {
           if (link == 'yes') {
	            section[page_indx][2] = new String('<div id='+section[page_indx][0]+' class="selected_tab1"><a href='+section[page_indx][1]+'>'+section[page_indx][4]+'</a></div>');
	       }                         
		   else {
	           section[page_indx][2] = new String('<div id='+section[page_indx][0]+' class="selected_tab1">'+section[page_indx][4]+'</div>');
	       }
	   }
	   
       document.writeln('<div id="qs_parent_menu">');
	   document.writeln(section[0][2]);
	   document.writeln(section[1][2]);
	   document.writeln(section[2][2]);	   
	   document.writeln('</div>');
	}
	 	
}

function get_menu2(menu, ed_indx, link) {
//jumpstart has been replaced by enterprise edition, but the tags have not changed only the viewable HTML has changed.  
	var color_bar;	 
	if (menu == 'products') {	 
    var lab = ["selected_lab", "lab.html","lab_tab2","lab_tab2Active","Lab Edition","lab_bar"];
	var core = ["selected_core","core.html","core_tab2","core_tab2Active","Core Edition","core_bar"];
	var jumpstart = ["selected_jumpstart","enterprise.html","jumpstart_tab2","jumpstart_tab2Active","Enterprise Edition", "jumpstart_bar"];
	 //NOTE jumpstart variables are actually changing the enterprise tab
    var edition = [lab,core,jumpstart];
	edition[0][6] = new String('<div id="lab" class="tab2"><a href="'+lab[1]+'" onMouseOver="highlight_tab(\'lab_tab2\');" onMouseOut="drop_hightlight(\'lab_tab2Active\');"><div id="'+lab[2]+'"><a href="'+lab[1]+'" onMouseOver="highlight_tab(\'lab_tab2\');" onMouseOut="drop_hightlight(\'lab_tab2Active\');">Lab Edition</a></div></a></div>');    
    edition[1][6] = new String('<div id="core" class="tab2"><a href="'+core[1]+'" onMouseOver="highlight_tab(\'core_tab2\');" onMouseOut="drop_hightlight(\'core_tab2Active\');"><div  id="'+core[2]+'"><a href="'+core[1]+'" onMouseOver="highlight_tab(\''+core[2]+'\');" onMouseOut="drop_hightlight(\''+core[3]+'\');">Core Edition</a></div></a></div>');
    edition[2][6] = new String('<div id="jumpstart" class="tab2"><a href="'+jumpstart[1]+'" onMouseOver="highlight_tab(\''+jumpstart[2]+'\');" onMouseOut="drop_hightlight(\''+jumpstart[3]+'\');"><div id="'+jumpstart[2]+'"><a href="'+jumpstart[1]+'" onMouseOver="highlight_tab(\''+jumpstart[2]+'\');" onMouseOut="drop_hightlight(\''+jumpstart[3]+'\');">Enterprise Edition</a></div></a></div>');

	if (ed_indx != 'nohlgt') {
	    // create string with anchor
    	if (link == 'yes') {
	        edition[ed_indx][6] = new String('<div id="'+edition[ed_indx][0]+'" class="selected_prod"><a href='+edition[ed_indx][1]+'>'+edition[ed_indx][4]+'</a></div>');
	    }                         
		else {
	       edition[ed_indx][6] = new String('<div id="'+edition[ed_indx][0]+'" class="selected_prod">'+edition[ed_indx][4]+'</div>');
		}
	}
	document.writeln('<div class="secondary_menu">');
	document.writeln(edition[0][6]);
	document.writeln(edition[1][6]);
    document.writeln(edition[2][6]);
	document.writeln('</div>');

    }
	else if (menu=='technology') {
	    var features = ["technology.html","features_tab2","features_tab2Active","Features","features"];
		var workflow = ["workflow.html","workflow_tab2","workflow_tab2Active","Workflow","workflow"];
		var tutorials = ["training.html","tutorials_tab2","tutorials_tab2Active","Support/Training","tutorials"];
	 
     	var edition = [features,workflow,tutorials];
		edition[0][6] = new String('<div id="features" class="tab2"><a href="'+features[0]+'" onMouseOver="highlight_tab(\''+features[1]+'\');" onMouseOut="drop_hightlight(\''+features[2]+'\');"><div id="'+features[1]+'"><a href="'+features[0]+'" onMouseOver="highlight_tab(\''+features[1]+'\');" onMouseOut="drop_hightlight(\''+features[2]+'\');">Features</a></div></a></div>');    
		edition[1][6] = new String('<div id="workflow" class="tab2"><a href="'+workflow[0]+'" onMouseOver="highlight_tab(\''+workflow[1]+'\');" onMouseOut="drop_hightlight(\''+workflow[2]+'\');"><div  id="'+workflow[1]+'"><a href="'+workflow[0]+'" onMouseOver="highlight_tab(\''+workflow[1]+'\');" onMouseOut="drop_hightlight(\''+workflow[2]+'\');">Workflow</a></div></a></div>');
    	edition[2][6] = new String('<div id="tutorials" class="tab2"><a href="'+tutorials[0]+'" onMouseOver="highlight_tab(\''+tutorials[1]+'\');" onMouseOut="drop_hightlight(\''+tutorials[2]+'\');"><div id="'+tutorials[1]+'"><a href="'+tutorials[0]+'" onMouseOver="highlight_tab(\''+tutorials[1]+'\');" onMouseOut="drop_hightlight(\''+tutorials[2]+'\');">'+tutorials[3]+'</a></div></a></div>');

	    if (ed_indx != 'nohlgt') {
	       // create string with anchor
    	   if (link == 'yes') {
	           edition[ed_indx][6] = new String('<div id="'+edition[ed_indx][4]+'" class="selected_tab2"><a href='+edition[ed_indx][0]+'>'+edition[ed_indx][3]+'</a></div>');
	       }                         
		   else {
	          edition[ed_indx][6] = new String('<div id="'+edition[ed_indx][4]+'" class="selected_tab2">'+edition[ed_indx][3]+'</div>');
		   }
	    }
		document.writeln('<div class="secondary_menu">');
		document.writeln(edition[0][6]);
		document.writeln(edition[1][6]);
    	document.writeln(edition[2][6]);
		document.writeln('</div>');	
	}
	else if (menu=='news') {
	    var news = ["news2","news.html","news2_tab2","news2_tab2Active","News",];
		var events = ["events", "events.html","events_tab2","events_tab2Active","Events"]; 
     	var edition = [news,events];
		edition[0][5] = new String('<div id="news2" class="tab2"><a href="'+news[1]+'" onMouseOver="highlight_tab(\''+news[2]+'\');" onMouseOut="drop_hightlight(\''+news[3]+'\');"><div id="'+news[2]+'"><a href="'+news[1]+'" onMouseOver="highlight_tab(\''+news[2]+'\');" onMouseOut="drop_hightlight(\''+news[3]+'\');">News</a></div></a></div>');    
		edition[1][5] = new String('<div id="events" class="tab2"><a href="'+events[1]+'" onMouseOver="highlight_tab(\''+events[2]+'\');" onMouseOut="drop_hightlight(\''+events[3]+'\');"><div  id="'+events[2]+'"><a href="'+events[1]+'" onMouseOver="highlight_tab(\''+events[2]+'\');" onMouseOut="drop_hightlight(\''+events[3]+'\');">Events</a></div></a></div>');

	    if (ed_indx != 'nohlgt') {
	       // create string with anchor
    	   if (link == 'yes') {
	           edition[ed_indx][5] = new String('<div id="'+edition[ed_indx][0]+'" class="selected_tab2"><a href='+edition[ed_indx][1]+'>'+edition[ed_indx][4]+'</a></div>');
	       }                         
		   else {
	          edition[ed_indx][5] = new String('<div id="'+edition[ed_indx][0]+'" class="selected_tab2">'+edition[ed_indx][4]+'</div>');
		   }
	    }
		document.writeln('<div class="secondary_menu">');
		document.writeln(edition[0][5]);
		document.writeln(edition[1][5]);
		document.writeln('</div>');	
	}
	
}


function latest_news() {
   document.writeln('<div class="spaceBar40">&nbsp;<br><\/div>');
   document.writeln('<div align="middle" class="font120bc"><b>Latest News<\/b><\/div>');
   document.writeln('<div class="spaceBar40">&nbsp;<br><\/div>');
   document.writeln('<a href="http://www.affymetrix.com/corporate/events/webinar/2005-09_statistical_webinar.affx" target="_new"><div class="news"><strong>August 11</strong>: Affymetrix to present webinar "Influence of experimental design on statistical analysis" September 21.</div>');
   document.writeln('<div class="spaceBar40">&nbsp;<br><\/div>');
   document.writeln('<a href="http://www.vizxlabs.com/newsroom/vizxlabs_gs_release_062705.html" target="_new"><div class="news"><strong>June 27</strong>: Frost & Sullivan awards GeneSifter its 2005 Product Innovation Award, noting that it "stands apart from its competitors."</div>');
   document.writeln('<div class="spaceBar40">&nbsp;<br></div>');
   }	







   
function init() {
var obj = document.getElementById('wrap');
//alert(obj);
obj.style.BorderColor = 'red';
}

function highlight_tab(val) {
        var ids = new Array(val);
        return browser_type('hglt',ids); 
}

function drop_hightlight (val) {
        var ids = new Array(val);
        return browser_type('drop_hglt',ids); 
}

function showOrg(id){
    var ids = new Array(id);
    if (document.demoform.organism7.checked == true) {  
        return browser_type('show', ids);
	}
	else {
	    return browser_type('hide', ids);
    }		
	
}

function show(id) {
    var ids_array = new Array(id);
	browser_type ('show',ids_array);
}
function browser_type (action, array, id_values) {
    if (w3c) {
		 if (action == 'hglt') {
				var obj = document.getElementById(array[0]);
		        var active_id = new String (array[0] + 'Active');
		        obj.id = active_id;			        
	    }     
        else if (action == 'drop_hglt') {
                var obj = document.getElementById(array[0]);
				var id_stringCut;
            	id_stringCut = obj.id.replace("Active", ""); 
            	obj.id = id_stringCut;		
	    }
		else if (action == 'show') {
			    var obj = document.getElementById(array[0]);
                obj.style.visibility = 'visible';
		}
		else if (action == 'hide') {
			    var obj = document.getElementById(array[0]);
				obj.value == "";
                obj.style.visibility = 'visible';
		}			   	        
	}
}


// function that swaps images
function rollover (name, indx){ 
    var img_obj =eval("document."+ name);  
    img_obj.src = document.img_array[indx].src;
}

   function preloadImages()  { 
      
      var d=document; 

      if(d.images) {        
         d.img_array=new Array();
         var i;
         var a= preloadImages.arguments; 
         for(i=0; i<a.length; i++) {
             d.img_array[i]=new Image; 
             d.img_array[i].src=a[i];
         }
      }
   }

var pop_up_win;
function new_win( url, win_name){

   
   if (win_name == 'workflow_pop') {
 
     pop_up_win = window.open( url, win_name,
        "width=350,height=500,x=0,y=0,scrollbars=yes,location=yes,resizable=yes,toolbar=no, menubar=no");pop_up_win.focus();
   }
   else if (win_name == 'small') {
        window.open( url, win_name,
        "width=600,height=600,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes,left=0,top=0");
   }

   else if (win_name == 'medium') {
       window.open( url, win_name,
       "width=800,height=800,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes" );
   }
   
   else if (win_name == 'large') {
       window.open( url, win_name,
       "width=900,height=800,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes,left=0,top=0" );
   }
   else if (win_name == 'info_pop') {
       window.open( url, win_name,
       "width=200,height=300,toolbar=no,menubar=no,scrollbars=no,location=no,resizable=no" );
   }
     else if (win_name == 'login') {
       window.open( url, win_name,
       "width=900,height=600,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes" );
   }
   else if (win_name == '700') {
       window.open( url, win_name,
       "width=700,height=700,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes,left=0,top=0" );
   }
      else if (win_name == '1000') {
       window.open( url, win_name,
       "width=1000,height=1000,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes,left=0,top=0" );
   }
   else if (win_name == 'quickstart') {
       window.open( url, win_name,
       "width=860,height=700,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=no,left=0,top=0" );
   }   
   else {
       window.open( url, win_name,
       "width=800,height=600,scrollbars=yes,location=yes,resizable=yes,toolbar=yes,menubar=yes" );
   }
}   
