// ==========================================================
// SGAS.js: Codigo JS NEXUS: nex_form_11_F para SGAS
// ==========================================================
var vSG_ws="http://"+location.hostname;
var vSG_idcomp="177";
var vSG_col="generico/newsletter";
var vSG_vcgi="http://vt.px.wke.es/vcgi/search.cgi";
var vSG_htmlcgi="http://vt.px.wke.es/vcgi/search.cgi";
var vSG_navigatecgi="http://vt.px.wke.es/vcgi/navega_NEXUS_v2.cgi";
var vSG_htmls="http://ht.px.wke.es";
var vSG_cfmhtml="/sgas/SGchkses_html.cfm";
var vSG_template_link_legis = "ctrib/ctrib_legis_12_L/plt_link_legis.hts";
var vSG_template_link_juris = "ctrib/ctrib_juris_12_J/plt_link_juris.hts";
var vSG_template_link_cons = "ctrib/ctrib_juris_12_J/plt_link_juris.hts";
var vSG_template_link_ex = "ctrib/ctrib_comen_12_E/plt_link_ex.hts";
var vSG_template_link_doct ="ctrib/ctrib_doct_12_D/plt_link_doct.hts";
var vSG_template_link_arti ="ctrib/ctrib_arti_12_N/plt_link_arti.hts";
var vSG_traduce_codigos = "http://vt.px.wke.es/vcgi/traduce_codigosPOST.cgi";
var vSG_cfmimg="/sgas/SGgetimg.cfm?img=http://imgs.wke.es/";
var vSG_traducir="1";
var vSG_traducir_masinfo="1";
var vSG_css="/o12/css/";
var vSG_getfhtml="/sgas/SGgetfhtml.cfm";
var vSG_tAUTH="&auth=ctrib";

// =======================================================================================
// FGS : fSGAS_chkses_vigente: Chequeo de la sesion SGAS en ficheros que enlazan desde el 
//						 archivo _vigente.html
// =======================================================================================
function fSGAS_chkses_vigente(urld,win_sgid,win_location,fjs)
{
 if (win_sgid === undefined) win_sgid=top;
 if (win_location === undefined) win_location=self;
 if (fjs === undefined) fjs="&js=s";
 var sgid= fSGAS_getsgid(win_sgid);
 win_location.location.replace(vSG_ws + "/sgas/SGchkses_html.cfm?sgid=" + sgid + fjs + "&urld=" + urld);
}

function getSgid()
{
	var args= new Object();
	var qs=top.location.search.substring(1);
 	var params= qs.split('&');
	for (var i=0; i < params.length; i++)
 	{
   		var pos= params[i].indexOf('=');
   		if (pos == -1) continue;
   		var argname= params[i].substring(0,pos);
		if(argname = "sgid"){sgid= params[i].substring(pos+1);}
	}
 	return sgid;
} 