
var track_image=new Image;
track_image.src="http://www.fujitsu.com/img/common/tracker.gif?h="+screen.availHeight+"&w="+screen.availWidth+"&userAgent="+escape(navigator.userAgent);


/* DROP DOWN */
function goThereDropDown(form, fieldname) {
    field = form[fieldname];
    if ( field == null ) { return false; }
    url = field.options[field.selectedIndex].value;
    if ( url.length > 0 ) {
        window.location.href = url;
        return true;
    }
    return false;
}

/* FLASH PLUGIN */
var plugver=0;
var flplugin = ((navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);

if(flplugin){
    var plugver=parseInt(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin.description.substring(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin.description.indexOf(".")-1));
}

function plugin_check() {
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="+f_width+" height="+f_height+">");
    document.write("<param name=movie value="+f_src+"><param name=quality value=high><param name=bgcolor value="+f_bgcolor+">");

    if(plugver>=ok_version || (navigator.userAgent.indexOf('Mac',0) >= 0 && navigator.appVersion.indexOf('MSIE 3.',0) >= 0) || (navigator.userAgent.indexOf('Mac',0) >= 0 && navigator.appVersion.indexOf('MSIE 4.',0) >= 0)){
        document.write("<embed src="+f_src+" quality=high pluginspage='http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width="+f_width+" height="+f_height+" alt="+f_alt+" bgcolor="+f_bgcolor+">");
        document.write("</embed>");
    }else{
        document.write(change_img);
    }
    document.write("</object>");
}

/* LEFT NAVI POPUP */
function popnavi(root,ver){
    var url = root + "navi/navi_" + ver + ".html";
    naviwin=window.open( url,"navi","toolbar=no,location=no,menubar=no,directories=no,status=no,scrollbars=no,resizable=no,top=0,left=0,width=280,height=520");
    naviwin.focus();
}

/* GENERIC POPUP */
function popup(pURL,pName,features){
    new_window = window.open(pURL, pName, features);
}

/* IMAGE POPUP */
function image_popup(pUrl,pAlt,pWidth,pHeight){
    var width = 620;
    var height = 460;
    if ( window.screen && (pWidth+30) < window.screen.availWidth ) {
        width = pWidth+30;
    }
    else if ( window.screen ) {
        width = window.screen.availWidth-30
    }
    if ( window.screen &&  (pHeight+60) < window.screen.availHeight ) {
        height = pHeight+60;
    }
    else if ( window.screen ) {
        height = window.screen.availHeight-30
    }
    popup(pUrl+'&alt='+escape(pAlt),'large_image', 'width='+width+',height='+height+',scrollbars=yes,toolbars=no,resizable=yes');
}

/* FBF2 css function */

var writeCSS=function(reg,ns) {
    var f =(((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)<=4))
    || (navigator.userAgent.indexOf("Opera",0)!=-1)) ? ns : reg;
    var inc ='<link rel="stylesheet" type="text/css" href="'+f+'">';
    document.open();
    document.write(inc);
    document.close();
}
var writeCss=writeCSS
function openLarge(src,w,h,desc,qt,swf) {
    var aw=screen.availWidth;var ah=screen.availHeight;
    var sw=parseInt(w)+30;var sh=parseInt(h)+50;
    var big=(sw>aw)||(sh>ah);
    sw=(sw>aw)?aw:sw;sh=(sh>ah)?ah:sh;
    var html='<html><head><title>'+desc+'</title></head><body bgcolor="white" leftmargin="5" rightmargin="5" topmargin="5" marginwidth="5" marginheight="5"><div align="center">';
    html+=qt?getQt(src,qt,w,h,desc):swf?getSwf(src,swf,w,h,desc):getImg(src,w,h,desc);
    html+='</div><form><div align="center"><input type="button" value="Close" onclick="window.close()" onkeypress="window.close()"></div></form></body></html>';
    var wstyle=((big)?'scrollbars=yes,':'')+'location=no,menubar=no,status=no,resizable=yes,toolbars=no,width='+sw+',height='+sh;
    var doc=window.open('','',wstyle).document;
    doc.open();
    doc.write(html);
    doc.close();
    return false;
}

function getImg(src,w,h,desc) {
	return '<img border="0" src="'+src+'" width="'+w+'" height="'+h+'" alt="'+desc+'">';
}

function getSwf(isrc,src,w,h,desc) {
	return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+w+'" height="'+h+'"><param name="quality" value="high"><param name="movie" value="'+src+'">'+getImg(isrc,w,h,desc)+'</object>';
}

function getQt(isrc,src,w,h,desc) {
	return '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="'+w+'" height="'+h+'"><param name="controller" value="TRUE"><param name="type" value="video/quicktime"><param name="autoplay" value="true"><param name="target" value="myself"><param name="src" value="'+src+'"><param name="pluginspage" value="http://www.apple.com/quicktime/download/indext.html">'+getImg(isrc,w,h,desc)+'</object>';
}

function openWindow(src,w,h) {
    window.open(src, '', 'width=' + w + ',height=' + h + ',scrollbars=yes,location=no,menubar=no,status=no,resizable=yes,toolbars=no');
}

function goDropDown(f) {
	var s=f.elements[0].options[f.elements[0].selectedIndex].value;
	if(s&&s!='') window.location.href=s;
	return false;
}

/* FBF Forms validator class */

function FF_Validator(name) {
	this.fv=new Array;
	this.form=document.forms[name];
}

function FF_Validator_addFV(name,label,validators) {
	var f={name:name,label:label,validators:new Array};
	var _v=validators.split(',');
	for(var i=0; i<_v.length; ++i) if(_v[i]) f.validators[f.validators.length]=FV[_v[i]];
	this.fv[this.fv.length]=f;
}

function FF_Validator_validate() {
	var err='';
	for(var i=0;i<this.fv.length;++i) 
		for(var j=0;j<this.fv[i].validators.length;++j) {
			var e=this.fv[i].validators[j](this.form.elements[this.fv[i].name]);
			if(e) { err+=e.replace('%1',this.fv[i].label)+'\n'; break; }
		}
	if(err) alert(err);
	return !err;
}

FF_Validator.prototype.addFV=FF_Validator_addFV;
FF_Validator.prototype.validate=FF_Validator_validate;

/* FBF Forms validator class */

function FF_Validator(name) {
	this.fv=new Array;
	this.fc=new Array;
	this.form=document.forms[name];
}

function FF_Validator_addFV(name,label,validators,cond) {
	var f={name:name,label:label,validators:new Array,cond:cond};
	var _v=validators.split(',');
	for(var i=0; i<_v.length; ++i) if(_v[i]) f.validators[f.validators.length]=FV[_v[i]];
	this.fv[this.fv.length]=f;
}

function FF_Validator_addFC(fc) {
	fc.form=this.form;
	fc.position=0;
	for(var i=0;i<this.fc.length;++i) if(fc.name==this.fc[i].name) ++fc.position;
	this.fc[this.fc.length]=fc;
}

function FF_Validator_validate() {
	var err='';
	for(var i=0;i<this.fv.length;++i) 
		for(var j=0;j<this.fv[i].validators.length;++j) {
			var e=(!this.fv[i].cond||this.fv[i].cond.check(this.form))?this.fv[i].validators[j](this.form.elements[this.fv[i].name]):'';
			/* label disappears when field is not visible */
			if(e&&this.fv[i].label) { err+=e.replace('%1',this.fv[i].label)+'\n'; break; }
		}
	if(err) alert(err);
	return !err;
}

function FF_Validator_resetAll() {
	for(var i=0;i<this.fc.length;++i) this.fc[i].toggle(this.form);
	return true;
}

FF_Validator.prototype.addFV=FF_Validator_addFV;
FF_Validator.prototype.addFC=FF_Validator_addFC;
FF_Validator.prototype.validate=FF_Validator_validate;
FF_Validator.prototype.resetAll=FF_Validator_resetAll;

/* Condition evaluators */
function FC_Condition(fn,name,value,hide,fields) {
	eval("this.cond=FCC_"+fn);
	this.name=name;
	this.value=value;
	this.hide=hide;
	this.fields=fields.split(',');
}

function FC_Condition_check(f) {
	return this.cond(f.elements[this.name],this.value);
}

function FC_Condition_toggle() {
	var c=this.check(this.form);
	for(var i=0;i<this.fields.length;++i) FC_Condition_setEnabled(this.form.elements[this.fields[i]],c);
	if(this.hide) {
		var n="fl_"+(this.form.id?this.form.id:this.form.name)+"."+this.name+(this.position>0?this.position:"");
		var l=document.getElementById?document.getElementById(n):
		document.all?document.all[n]:'';
		if(l) l.style.display=c?"":"none";
	}
	return 1;
}

function FC_Condition_setEnabled(f,c) {
	if(f) switch(f.type||f[0].type) {
		case 'text':
		case 'textarea':
		case 'password':
		case 'select-multiple':
		case 'select-one':
			return f.disabled=!c;
		case 'radio':
		case 'checkbox':
			if(f.length) for(var i=0; i<f.length; ++i) f[i].disabled=!c;
			else f.disabled=!c;
	}
	return 1;
}

FC_Condition.prototype.check=FC_Condition_check;
FC_Condition.prototype.toggle=FC_Condition_toggle;

function FCC_is_non_empty(f) {
	switch(f.type||f[0].type) {
		case 'text':
		case 'textarea':
		case 'password':
			return f.value&&f.value!='';
		case 'select-multiple':
		case 'select-one':
			return f.selectedIndex&&f.selectedIndex>0;
		case 'radio':
		case 'checkbox':
			if(f.length) { for(var i=0; i<f.length; ++i) if(f[i].checked) return true; }
			return f.disabled;
	}
	return false;
}

function FCC_is_empty(f) {
	return !FCC_is_non_empty(f);
}

function FCC_has_the_value(f,value) {
	switch(f.type||f[0].type) {
		case 'text':
		case 'textarea':
		case 'password':
			return f.value&&f.value==value;
		case 'select-multiple':
		case 'select-one':
		case 'radio':
		case 'checkbox':
			if(f.length) for(var i=0; i<f.length; ++i) if(f[i].checked&&f[i].value==value) return true;
			return f.value==value;
	}
	return false;
}

/* Field validators 
   Return the error message, or '' if okay */
function FV_required(f) {
	return FCC_is_non_empty(f)?'':_RB['f_required'];
}
function FV_email(f) {
	var p;
	return (!f.value||/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(f.value))?'':_RB['f_e-mail'];
}
function FV_uszip(f) {
	return (!f.value||(f.value.length==5&&/\d{5}/.test(f.value))
	||(f.value.length==10&&/\d{5}-\d{4}/.test(f.value)))?'':_RB['f_uszip'];
}
function FV_usphone(f) {
	f.value=f.value.replace(/\s/g,'');
	return (!f.value||/1?[(-]?\d{3}[)-]\d{3}-?\d{4}/.test(f.value))?'':_RB['f_usphone'];
}
var FV=new Array;
FV['required']=FV_required;
FV['email']=FV_email;
FV['us-zip']=FV_uszip;
FV['us-phone']=FV_usphone;
var _RB=new Array;
var FBF_Locale='en';


/* TOGGLE OVERVIEW */
var plusIcon = new Image(14,14);
plusIcon .src = "http://www.fujitsu.com/img/common/icons/toggle-plus.gif";
var minusIcon = new Image(14,14);
minusIcon.src = "http://www.fujitsu.com/img/common/icons/toggle-minus.gif";


function ToggleOverview(overviewId, iconId) {
	var image=document.images?document.images[iconId]:'';
	var overview=
		document.getElementById?document.getElementById(overviewId).style:
		document.all?document.all[overviewId].style:'';
	if(image&&overview) {
		var s=(overview.display=="none");
		image.src=s?minusIcon.src:plusIcon.src;
		overview.display=s?"":"none";
		return false;
	} else return true;
}

/* R3.57 */
function Global() {
	this.h=new Array;
}
function Global_handleOnload() {
	for(var i=0;i<this.h.length;++i) { this.h[i](); }
}
function Global_addOnload(f) {
	this.h[this.h.length]=f;
}
Global.prototype.handleOnload=Global_handleOnload;
Global.prototype.addOnload=Global_addOnload;
var global=new Global();

window.onload=function() { global.handleOnload(); };

function ca(a,b) {
	var c=new Array();
	if(a.length) for(var i=0;i<a.length;++i) { c[c.length]=a[i]; }
	if(b.length) for(var i=0;i<b.length;++i) { c[c.length]=b[i]; }
	return c;
}

global.addOnload(function (){
	var rs=7; /* for spacing between toggle image and the following text */
	var ul=document.getElementsByTagName('ul');
	ul=ca(ul,document.getElementsByTagName('ol'));
	ul=ca(ul,document.getElementsByTagName('dl'));
	for(var i=0;i<ul.length;++i) {
		if(/(toggle)/.test(ul[i].className)) {
			var li=ul[i].getElementsByTagName('li');
			li=ca(li,ul[i].getElementsByTagName('dd'));
			for(var j=0;j<li.length;++j){
				var l=li[j];
				var a=l.getElementsByTagName('a')[0];
				if(!a) a=l.getElementsByTagName('h3')[0];
				var p=l.getElementsByTagName('div')[0];
				if(!p) p=l.getElementsByTagName('p')[0];				
				if(a) { 
					var a2=document.createElement('a');
					if(a.href) a2.href=a.href;
					var img=document.createElement('img');
					img.className = 'bordernone';	
					img.src = plusIcon.src;
					img.style.marginRight = rs+'px';
					a2.appendChild(img);
					a2.style.marginLeft='-'+(img.width+rs+(document.all?11:0))+'px';
					l.insertBefore(a2, l.firstChild);
					l.style.listStyle='none';
					if(p) p.style.display='none';
					a2.onclick=a2.onkeypress=function() {
						return toggle(this);			
					}
				}
			}
		}
	}
});

function toggle(a) {
	var i=a.getElementsByTagName('img')[0];
	var p=a.parentNode.getElementsByTagName('div')[0];
	if(!p) p=a.parentNode.getElementsByTagName('p')[0];
	if(!p) return true;
	if(i) {
		var s=(p.style.display=='none');
		i.src=s?minusIcon.src:plusIcon.src;
		p.style.display=s?"":"none";
		return false;
	} else return true;
}


/* TOGGLE ASSETINFO */
var infoIcon = new Image(16,16);
infoIcon .src = "http://www.fujitsu.com/img/common/icons/info.gif";
var rinfoIcon = new Image(16,16);
rinfoIcon.src = "http://www.fujitsu.com/img/common/icons/r-info.gif";


function ToggleAssetInfo(assetinfoId, iconId) {
	var image=document.images?document.images[iconId]:'';
	var assetinfo=
		document.getElementById?document.getElementById(assetinfoId).style:
		document.all?document.all[assetinfoId].style:'';
	if(image&&assetinfo) {
		var s=(assetinfo.display=="none");
		image.src=s?rinfoIcon.src:infoIcon.src;
		assetinfo.display=s?"":"none";
		return false;
	} else return true;
}






// TABS: Support Methods

// Extracts the tab set id from a tab id
function tabSetIdFromTabId(tabId) {
    if(tabId == null) { return null; }
    var idx = tabId.indexOf("/");
    if( idx <= 0 ) { return null; }
    return tabId.substr(0,idx);
}

// converts a content tab to a tab id
function tabIdFromContentId(tabContentId) {
    if(!tabContentId) { return null; }
    var content = "/Content";
    var idx = tabContentId.indexOf(content);
    return tabContentId.substr(0,idx) + tabContentId.substr(idx+content.length);
}

// Safari will have a single slash in file:// urls in window.location.href but triple slash
// in a.href, so this function normalizes the slashes to two
function tabUrlCleanup(url) {
    if(!url || url == "") { return url; }
    var colonSlashIdx = url.indexOf(":/");
    if(colonSlashIdx > 10 || colonSlashIdx < 0) { return url; }
    var idx = colonSlashIdx + 2;
    while( url.charAt(idx) == '/' ) { idx++; }
    return url.substr(0,colonSlashIdx) + "://" + url.substr(idx);
}

// This takes two urls, and returns the reference from the target, IF the target
// url is relative to the base url.  Null is returned if target does not have #ref
// or is not relative to base
function tabExtractReference(base, target) {
    var idx;
    idx = base.indexOf("#");
    if(idx > 0) { base = base.substr(0,idx); }
    idx = target.indexOf("#");
    if (idx < 0) { return null;}
    else if(idx == 0) { return target; }
    if(tabUrlCleanup(target.substr(0,idx)) == tabUrlCleanup(base)) {
        return target.substr(idx+1);
    }
    return null;
}

// TABS: Main functional methods

// Sets the default tab by looking for the first content div in each tab set, and also
// trying to extract the tab reference from the url
function tabShowDefaults() {
    if (!document.getElementsByTagName) { return null; }
    if (!document.getElementById) { return null; }
    // associative array of tabSetId, defaultTabId
    var defaultTabs = new Array();
    var tabSet = document.getElementById("Tab0");
    for(var num = 1; tabSet !=null; tabSet = document.getElementById("Tab"+num++)) {
        var divs = tabSet.getElementsByTagName("div");
        // we're finding the first div of type tab.
        for(var i=0; i < divs.length; i++) {
            var div = divs[i];
            var className = div.className;
            if (i == 0) {
                // apply a key style only if we have javascript
                div.className = "tabs";
            } 
            else if (className == "tabc" || className == "tabh") {
                defaultTabs[tabSet.id] = tabIdFromContentId(div.id);
                break;
            }
        }
    }
    // extract the default tab id from the url
    var urlTabId = tabExtractReference(window.location.href, window.location.href);
    var urlTabSetId = tabSetIdFromTabId(urlTabId)
    if(document.getElementById(urlTabId) && document.getElementById(urlTabSetId)) {
        defaultTabs[urlTabSetId] = urlTabId;
    }
    // show defaults
    for( tabSetId in defaultTabs ) {
        tabShow(defaultTabs[tabSetId]);
    }
    return true;
}

// Shows a tab's content div
function tabShowContent(tabId)
{
    if (!document.getElementsByTagName) { return null; }
    if (!document.getElementById) { return null; }
    // first we get the tabSet (the div that enloses both the tabs and content)
    var tabSet = document.getElementById(tabSetIdFromTabId(tabId));
    if(!tabSet) { return null; }
    // calc the content div from the tabId
    var tabContentId = tabSet.id + "/Content" + tabId.substr(tabSet.id.length);
    // now get all the divs in the tabSet
    var divs = tabSet.getElementsByTagName("div");
    for(var i=0; i < divs.length; i++) {
        var div = divs[i];
        var className = div.className;
        var id = div.id;
        if (id == tabContentId) {
            div.className = "tabc";
        } else if (className == "tabc") {
            div.className = "tabh";
        }
    }
}

// Sets a tab to current
function tabActivate(tabId) {
    if (!document.getElementsByTagName) { return null; }
    if (!document.getElementById) { return null; }
    // first we verify this is a valid tab
    var tab = document.getElementById(tabId);
    if(!tab) { return null; }
    // then we get the tabSet (the div that enloses both the tabs and content)
    var tabSet = document.getElementById(tabSetIdFromTabId(tabId));
    if(!tabSet) { return null; }
    // then all lis from the ul that contains the tabs
    var tabs = tabSet.getElementsByTagName("ul")[0].getElementsByTagName("li");
    for(var i = 0; i < tabs.length; i++) {
        tabs[i].className = "tab";
    }
    tab.className = "current";
}

// Adds javascript onclick commands to tab links
function tabFixLinks()
{
    if (!document.getElementsByTagName) { return null; }
    if (!document.getElementById) { return null; }
    var tabSet = document.getElementById("Tab0");
    for(var num = 1; tabSet != null; tabSet = document.getElementById("Tab"+num++)) {
        var tabUL = document.getElementsByTagName("ul")[0];
        var anchors = tabUL.getElementsByTagName("a");
        for(var i=0; i < anchors.length; i++) {
            var a = anchors[i];
            var ref = tabExtractReference(window.location.href, a.href);
            if (ref != null) {
                ref = "tabShow('" + ref + "');";
                a.setAttribute("href", "javascript: " + ref);
                a.setAttribute("onclick",ref+';this.blur()');
                a.setAttribute("onkeypress",ref+';this.blur()');
            }
        }      
    }
    
    return true;
}

// TABS: External methods

// Main method to show a specific tab and hide all others in the set
function tabShow(tabId) {
    tabActivate(tabId)
    tabShowContent(tabId);
}

// initialize tabs -- should be called by onload
global.addOnload(function () {
    tabFixLinks();
    tabShowDefaults();
    
    return true;
});



/** GIG3 **/
var ua,mode;

ua = navigator.userAgent;



if(ua.indexOf("Mac", 0) >= 0){
mode = "mac_";
}
else if(ua.indexOf("Win", 0) >= 0){
mode = "win_";
}
else{
mode = "other_";
}



if(ua.indexOf("Opera", 0) >= 0){
mode += "opera";
}

else if(ua.indexOf("MSIE 6", 0) >= 0){
mode += "msie";
}

else if(ua.indexOf("MSIE 5", 0) >= 0){
mode += "msie5";
}

else if(ua.indexOf("Mozilla/4.0", 0) >= 0){
mode += "msie";
}

else if(ua.indexOf("Mozilla/4", 0) >= 0){
mode += "ns4";
}

else if(ua.indexOf("Safari", 0) >= 0){
mode += "safari";
}

else{
mode += "other";
}



if(mode == "mac_msie5"){
document.write("<link rel=stylesheet href=/inc/initialize_msiemac5_s.css />");
}

else if(mode == "mac_ns4"){
document.write("");
}

else if(mode == "mac_safari"){
document.write("<link rel=stylesheet href=/inc/initialize_safari_s.css />\n");
}

else if(mode == "mac_opera"){
document.write("<link rel=stylesheet href=/inc/initialize_opera_s.css />\n");
}

else if(mode == "mac_other"){
document.write("<link rel=stylesheet href=/inc/initialize_gecko_s.css />\n");
}

else if(mode == "win_msie"){
document.write("<link rel=stylesheet href=/inc/initialize_msie_s.css />\n");
}

else if(mode == "win_msie5"){
document.write("<link rel=stylesheet href=/inc/initialize_msie5_s.css />\n");
}

else if(mode == "win_ns4"){
document.write("");
}

else if(mode == "win_opera"){
document.write("<link rel=stylesheet href=/inc/initialize_opera_s.css />\n");
}

else if(mode == "win_other"){
document.write("<link rel=stylesheet href=/inc/initialize_gecko_s.css />\n");
}

else if(mode == "other_msie"){
document.write("<link rel=stylesheet href=/inc/initialize_msie_s.css />\n");
}

else if(mode == "other_ns4"){
document.write("");
}

else if(mode == "other_opera"){
document.write("<link rel=stylesheet href=/inc/initialize_opera_s.css />\n");
}

else if(mode == "other_other"){
document.write("<link rel=stylesheet href=/inc/initialize_gecko_s.css />\n");
}

else{
document.write("<link rel=stylesheet href=/inc/initialize_gecko_s.css />\n");
}

