
var isNav6,isNav4,isIE;
if(document.getElementById){
isNav6=true;
}
else if(document.layers){
isNav4=true;
}
else{
isIE=true;
}
function checkBrowser()
{
var strBrowser=navigator.appName;
var fltVer=parseFloat(navigator.appVersion);
var agt=navigator.userAgent.toLowerCase();
var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));
var is_ie4up=(is_ie&&(fltVer>=4));
var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)
&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)
&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1));
var is_nav45up=(is_nav&&(fltVer>=4.5));
if((strBrowser=="Netscape"&&!is_nav45up)
||(strBrowser=="Microsoft Internet Explorer"&&!is_ie4up))
{
spawnPDFWindow('/site/browser_check.affx');
}
}
function changeImage(imgDocID,imgObjName){
if(document.images[imgDocID].complete){
document.images[imgDocID].src=eval(imgObjName+".src");
}
}
function fixIt(){
if(isNav4){
origWidth=innerWidth;
origHeight=innerHeight;
if(innerWidth!=origWidth||innerHeight!=origHeight){
location.reload();
}
}
}
function enlarge(path){
window.open("/community/wayahead/enlarge.jsp?image="+path,"Affymetrix_"+which,"height=500,width=500");
which++;
}
function enlargeImg(){
var query=window.location.search.substring(1);
var values=query.split("=");
var path=values[1];
var stringA=path.substring(0,(path.length-4));
var ext=path.substring((path.length-4),path.length);
var newImg=stringA+"_enlarge"+ext;
return newImg;
}
function spawnWindow(url,windowname,attributes){
var urlString=url;
if(urlString.indexOf(".pdf")!=-1){
remote=window.open(url,windowname,attributes);
remote.location=url;
}
else{
remote=window.open(url,windowname,attributes);
}
remote.focus();
if(remote.opener==null){
remote.opener=window;
}
}
function spawnHelpWindow(url){
help=spawnWindow(
url,
"affx_help",
"width=600,height=550,screenX=100,screenY=100,top=100,left=100,resizable=yes,toolbar=no,scrollbars=yes");
}
function spawnPDFWindow(url){
help=spawnWindow(
url,
"affx_pdf",
"width=750,height=550,screenX=150,screenY=150,top=150,left=150,resizable=yes,toolbar=yes,location=yes,scrollbars=yes");
}
function spawnFlashWindow(url){
help=spawnWindow(
url,
"affx_flash",
"width=1024,height=768,screenX=150,screenY=100,top=150,left=150,resizable=yes,toolbar=no,scrollbars=yes");
}
function spawnResizeWindow(url){
help=spawnWindow(
url,
"affx_resize",
"resizable=no,toolbar=no,location=no,scrollbars=no,menubar=no,status=no");
}
function spawnNewsWindow(url){
help=spawnWindow(
url,
"affx_news",
"width=725,height=550,screenX=200,screenY=200,top=200,left=200,resizable=yes,toolbar=yes,location=no,scrollbars=yes");
}
var array_finder_window;
function spawnArrayFinderWindow(secureserver){
url=secureserver+"/products/arrays/array_finder/array_finder.jsp";
array_finder_window=spawnWindow(
url,
"ArrayFinder",
"width=500,height=400,screenX=100,screenY=100,top=100,left=100,resizable=yes,toolbar=no,scrollbars=yes,status=yes");
}
function spawnUCSCWindow(){
help=spawnWindow(
"/analysis/query/query_ucsc.jsp",
"affx_ucsc",
"width=750,height=550,screenX=150,screenY=150,top=150,left=150,resizable=yes,toolbar=yes,location=yes,scrollbars=yes");
}
function statusBar(str){
window.status=str;
return true;
}
function spawnToLink(url){
var selectedopt=url.options[url.selectedIndex]
if(document.getElementById&&selectedopt.getAttribute("target")=="affy_corp"){
var urlstring=selectedopt.value;
help=spawnWindow(
urlstring,
"affy_corp",
"width=1024,height=768,screenX=150,screenY=100,top=150,left=150,resizable=yes,toolbar=yes,location=yes,scrollbars=yes");
}
}
function spawnCorpLink(url)
{
var url=url.value;
var reExpr=new RegExp("jp");
var str=url.match(reExpr)
if(str!=null){
window.open(url,"_self");
}
else{
window.open(url,
"affycorp",
"width=1024,height=768,screenX=150,screenY=100,top=150,left=150,resizable=yes,toolbar=yes,location=yes,scrollbars=yes");
}
}
function fitPic(){
if(window.innerwidth){
iWidth=window.innerwidth;
iHeight=window.innerHeight;
}
else{
iWidth=document.body.clientWidth;
iHeight=document.body.clientHeight;
}
iWidth=document.images[0].width-iWidth;
iHeight=document.images[0].height-iHeight;
window.resizeBy(iWidth,iHeight);
}
this.helpnotice=function(){
helpX=15;
helpY=15;
$(".helpnotice").hover(function(e){
this.tmp=this.title;
this.title="";
$("body").append("<p id='tooltip'>"+this.title+"</p>");
$("#tooltip").css("top",(e.pageY-helpX)+"px").css("left",(e.pageX+helpY)+"px").fadeIn("fast");
},
function(){
this.title=this.tmp;
$("#tooltip").remove();
});
$(".helpnotice").mousemove(function(e){
$("tooltip").css("top"(e.pageY-helpX)+"px").css("left",(e.pageX+helpY)+"px");
});
}
