//////////////////////////////////////////////////////////////////////////////////////////////////////////
// INFOSOFT SA DE CV
// Fecha: 01-17-2005
// Updates:01-18-2005
// Author:Rodolfo Machon
// Nombre del archivo: link.js
// Description:
//////////////////////////////////////////////////////////////////////////////////////////////////////////
var openwindow;
function GetBack(parameters,form){
	var params	= parameters.split(",");
	var lan		= parent.list.document.linkl.lan.value;
	var appid	= parent.list.document.linkl.appid.value;
	var component	= parent.list.document.linkl.appid.value;
	if (!openwindow || openwindow.closed){
		win ="window.open('../bin/"+params[0]+".exe?lan="+lan+"&appid="+appid+"&clase="+params[1]+"&passback="+form+"','"+params[0]+params[1]+"','left="+params[2]+",top="+params[3]+",width=100,height=100,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}
	else{openwindow.focus()}
}
function OpenWindow(parameters){
	var params	= parameters.split(",");
	var lan		= parent.list.document.linkl.lan.value;
	var appid	= parent.list.document.linkl.appid.value;
	var component	= parent.list.document.linkl.appid.value;
	if (!openwindow || openwindow.closed){
		win ="window.open('../bin/"+params[0]+".exe?lan="+lan+"&appid="+appid+"&clase="+params[1]+"','"+params[0]+params[1]+"','left="+params[2]+",top="+params[3]+",width=100,height=100,scrollbars=no,toolbar=no,menu=no,resizable')";
		openwindow=eval(win);
	}
	else{openwindow.focus()}
}
function ConstructTable(){
	var grid_header		= parent.list.document.linkl.gh.value.split(",");	
	var grid_links		= parent.list.document.linkl.gl.value.split("~~");
	var T  			= parent.list.document.getElementById('t');
	var NewRow		= T.insertRow(0);
	var NewCell		= NewRow.insertCell(0);
	NewCell.innerHTML	= "";
	for (var i=0;i<grid_links.length-1;i++){
		record			= grid_links[i].split("|");
		NewRow			= T.insertRow(i+1);
		NewCell			= NewRow.insertCell(0);
		href			= "<a href=javascript:OpenWindow('"+record[1]+"')>"+record[2]+"</a>";
		NewCell.innerHTML	= href;
	}
}

function CloseAll(){
     if (users && users.open && !users.closed) users.close();
     if (desktop_layouts && desktop_layouts.open && !desktop_layouts.closed) desktop_layouts.close();     
     if (profiles && profiles.open && !profiles.closed) profiles.close();
     if (permissions && permissions.open && !permissions.closed) permissions.close();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////