var _gbcPath="./";
var _gbcDoc="None";
var _gbcMsie=0;

function Get_CSS(gbcPath,gbcDoc)
{
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    var s = '<link title=default rel=stylesheet type="text/css" href="';
    var s1 = '';
    var s2 = '';
    _gbcDoc=gbcDoc;
    _gbcMsie=(msie>0)?1:0;
    if(gbcPath=="0") _gbcPath="../";
    if(gbcPath=="1") _gbcPath="../../";
    s+= _gbcPath;
    s+= 'css/';
    if(window.name == 'printhtml') {
        s1 = s + 'gbc_prn.css">'; 
        document.write(s1);
    } else {
        s1 = s + 'gbc.css">'; 
        if (msie>0) { s2 = s + 'gbc_ie.css">'; } else { s2 = s + 'gbc_op.css">'; }
        document.write(s1);
        document.write(s2);
    }
    s = '<link rel="icon" type="image/png" href="';
    s+= _gbcPath;
    s+= 'css/gbc.png">';
    document.write(s);
    document.write('<base target="_self">');
}
function Get_Frames1()
{
    var s;
    var s1='<iframe class=gbcheader src="';
    var s2='css/gbc_head.htm" frameborder=0 scrolling=no>';
    var s3='<img class=gbcheader alt=header src="';
    var s4='css/gbc_head.png"></iframe>';
    if(window.name != 'printhtml') {
        s=s1+_gbcPath+s2;
        document.write(s);
        s=s3+_gbcPath+s4;
        document.write(s);
    } 
    else {
        document.write('<div class="gbchead"><table class="gbchead" cellspacing="0" cellpadding="0">');
        document.write('<tr><td class="gbchead"><b>Worldwide Bioclimatic Classification System</b> - www.globalbioclimatics.org</td></tr>');
        document.write('<tr><td class="gbchead">© 1996-2008 S.Rivas-Martínez, Phytosociological Research Center, Spain</td></tr>');
        document.write('<tr><td class="gbchead">Document Number: '+_gbcDoc+'</td></tr>');
        document.write('</table></div>');
    }
}
function Get_Frames2()
{
    var s;
    var s1='<iframe class=gbcfooter src="';
    var s2='css/gbc_foot.htm" frameborder=0 scrolling=no>';
    var s3='<img class=gbcfooter alt=footer src="';
    var s4='css/gbc_foot.png"></iframe>';
    if(window.name != 'printhtml') {
        s=s1+_gbcPath+s2;
        document.write(s);
        s=s3+_gbcPath+s4;
        document.write(s);
    }
    else {
        document.write('<br><br>');
    }
}
function Get_NAV(handle)
{
	var xleft = (screen.width-575)/2;
	var xtop = ((screen.height-400)/2)*0.85;
	if (screen.height<600) { xtop=0;}
	var options= 'width=575,height=400,top=' +xtop +',left=' + xleft +',scrollbars=no,resizable=no,status=no,location=no';
	var hWnd = window.open("", handle, options) ;
	if (!hWnd.opener) hWnd.opener = self;
	hWnd.focus();
	hWnd.document.writeln("<html><head>");
	hWnd.document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
	hWnd.document.writeln("<meta http-equiv='Content-Language' content='en'>");
	hWnd.document.writeln("</head><body><pre>");
	hWnd.document.writeln("appName:         "+window.navigator.userAgent);
	hWnd.document.writeln("appVersion:      "+window.navigator.appVersion);
	hWnd.document.writeln("appCodeName:     "+window.navigator.appCodeName);
	hWnd.document.writeln("userAgent:       "+window.navigator.userAgent);
	hWnd.document.writeln("cookieEnabled:   "+window.navigator.cookieEnabled);
	hWnd.document.writeln("appMinorVersion: "+window.navigator.appMinorVersion);
	hWnd.document.writeln("browserLanguage: "+window.navigator.browserLanguage);
	hWnd.document.writeln("connectionSpeed: "+window.navigator.connectionSpeed);
	hWnd.document.writeln("cpuClass:        "+window.navigator.cpuClass);
	hWnd.document.writeln("onLine:          "+window.navigator.onLine);
	hWnd.document.writeln("platform:        "+window.navigator.platform);
	hWnd.document.writeln("systemLanguage:  "+window.navigator.systemLanguage);
	hWnd.document.writeln("userLanguage:    "+window.navigator.userLanguage);
	hWnd.document.writeln("userProfile :    "+window.navigator.userProfile );
	hWnd.document.writeln("</pre></body></html>");
}
function Get_W3C(handle)
{
    var xleft = (screen.width-600)/2;
    var xtop = ((screen.height-400)/2)*0.75;
    var url = 'http://validator.w3.org/check?uri='+window.parent.location.href;
    if (screen.height<600) { xtop=0;}
    var options= 'width=600,height=400,top=' +xtop +',left=' + xleft +',scrollbars=yes,resizable=yes,status=yes,location=yes,menu=yes,menubar=yes';
    var hWnd = window.parent.open(url, handle, options);
    if (!hWnd.opener) hWnd.opener = window.self;
    hWnd.focus();
}
function Get_PRN(handle)
{
    var xleft = (screen.width-600)/2;
    var xtop = ((screen.height-400)/2)*0.75;
    var url = window.parent.location.href;
    if (screen.height<600) { xtop=0;}
    var options= 'width=600,height=400,top=' +xtop +',left=' + xleft +',scrollbars=yes,resizable=yes,status=yes,location=yes,menu=yes,menubar=yes';
    var hWnd = window.parent.open(url, handle, options);
    if (!hWnd.opener) hWnd.opener = window.self;
    hWnd.focus();
}
function abrirVentana(url, handle)
{
    var xleft = (screen.width-575)/2;
    var xtop = ((screen.height-400)/2)*0.85;
    if (screen.height<600) { xtop=0;}
    var options= 'width=575,height=400,top=' +xtop +',left=' + xleft +',scrollbars=yes,resizable=yes,status=no,location=no';
    var hWnd = window.open(url, handle, options) ;
    if (!hWnd.opener) hWnd.opener = self;
    hWnd.focus();
}

