var swCM = 1
var myi=new Image; myi.src="../../gfx/arrow__r.gif";
var myiw=new Image; myiw.src="../../gfx//arrow__rw.gif";
var myie=new Image; myie.src="../../gfx/arrow__e.gif";
var myis=new Image; myis.src="../../gfx/spacer.gif";
var myisb=new Image; myisb.src="../../gfx/spacer__b.gif";

var IdEntityActive = 0
var kto            = 2000;
var mymenuwidth    = "190px"
var bg_color       = "#D6D6D6";
var bg_color_hl    = "navy";
var fg_color       = "black";
var fg_color_hl    = "white";
var spc            = "#SPACER#";
var arr            = "#ARROW#";
var Strrol = ''
var StrRolFunc = ''
var StrClassProh = ''
var StrFuncClassProh = ''
var StrAttClasesDefault = ''
function menuarray3(){
	for(jj=0;jj<m1.length;jj++){
		m1[jj] = Array("","","");
	}
	for(jj=0;jj<m11.length;jj++){
		m11[jj] = Array("","","");
	}
	for(jj=0;jj<m12.length;jj++){
		m12[jj] = Array("","","");
	}
	for(jj=0;jj<m13.length;jj++){
		m13[jj] = Array("","","");
	}
	
	for(jj=0;jj<m14.length;jj++){
		m14[jj] = Array("","","");
	}

	
    m1[0]=new Array("");
    m1[1]=new Array(""+arr,"",11);
    m1[2]=new Array(""+arr,"",12);
    m11[0]=new Array("");
    m12[0]=new Array("");
    m13[0]=new Array("");
    m14[0]=new Array("");
}

var mvect=new Array(1,11,12,13,14);
var m1=new Array;
var m11=new Array;	
var m12=new Array;	
var m13=new Array;
var m14=new Array;
aa = menuarray3()
var th;
var tw;
var vas=0;
var llv=false;
var tid;
var ksm=0;
var NewWin=0;

function stoperror(){
	return true;
}
window.onerror=stoperror;

function createMenus3(){
	for(xyzzy=0;xyzzy<mvect.length;xyzzy++){
		document.write("<DIV id='teva"+mvect[xyzzy]+"' class='men'>");
		document.write("</DIV>");
	}
}

function initMenu2(t){
var obj=eval("teva"+t);
var vect=eval("m"+t);
var ve1;		
var ve2;
var ve3;
var spacers=0;
var StrAcum = "<TABLE WIDTH='100%' BORDER=0 CELLSPACING=0 CELLPADDING=0>"
var ContRows = 0
	for(jj=0;jj<vect.length;jj++){
  	    if(vect[jj][0]!='')
		ContRows++
	}
	if (ContRows==0){
		obj.style.height="0px";
		obj.style.width="0px";
		
	}else{
		obj.style.height=(ContRows-1)*16+"px";
		obj.style.width=mymenuwidth;
	}	
	if(t==1){
		th=obj.style.height.substr(0,obj.style.height.length-2);
		tw=obj.style.width.substr(0,obj.style.width.length-2);
	}

	for(i=1;i<vect.length;i++){
	    ve1=eval("vect["+i+"][0]");
  	    if(ve1!=''){
		StrAcum+="<TR'>";
		if(ve1==spc){
			spacers++;
			//StrAcum+="<TD colspan=3 style='height:8px;'><img src='"+myisb.src+"' style='width:3px;height:2px;'><img src='"+myis.src+"' style='width:95%;height:2px;'></TD>";
			StrAcum+="<TD colspan=3 style='height:8px;'><hr/></TD>";
		}else{ 
			ve2=eval("vect["+i+"][1]");
			ve3=eval("vect["+i+"][2]");
			if(ve1.match(arr)){
				var oy=16*(i-1)-spacers*8;
				StrAcum+="<TD class='imgtd' style='border:1px solid "+bg_color+";' id='m_"+t+"_"+i+"a' onmouseover='act_td("+t+","+i+");showSubMenu("+t+","+ve3+","+oy+");' onmouseout='nonact_td("+t+","+i+");'><img id='m_"+t+"_"+i+"ap' src='"+ve2+"' class='icondimensions'></TD>";
				StrAcum+="<TD onmouseover='act_td("+t+","+i+");showSubMenu("+t+","+ve3+","+oy+");' onmouseout='nonact_td("+t+","+i+");' class='tdmenu' id='m_"+t+"_"+i+"'>&nbsp;"+ve1.substr(0,ve1.length-7)+"</TD>";
				StrAcum+="<td class='imgtd' id='m_"+t+"_"+i+"b' onmouseover='act_td("+t+","+i+");showSubMenu("+t+","+ve3+","+oy+");' onmouseout='nonact_td("+t+","+i+");'><img class='arr' id='m_"+t+"_"+i+"bp' src='"+myi.src+"'></td>";
			}else{
				StrAcum+="<TD class='imgtd' style='border:1px solid "+bg_color+";' id='m_"+t+"_"+i+"a' onmouseover='act_td("+t+","+i+");' onmouseout='nonact_td("+t+","+i+");' oncontextmenu='swCM=0;eval(m"+t+"["+i+"][2]);' onclick='eval(m"+t+"["+i+"][2]);'> <img id='m_"+t+"_"+i+"ap' src='"+ve2+"' class='icondimensions'></TD>";
				StrAcum+="<TD onmouseover='act_td("+t+","+i+");' onmouseout='nonact_td("+t+","+i+");' oncontextmenu='swCM=0;eval(m"+t+"["+i+"][2]);' onclick='eval(m"+t+"["+i+"][2]);' class='tdmenu' id='m_"+t+"_"+i+"'>&nbsp;"+ve1+"</TD>";
				if (NewWin==0)
				   StrAcum+="<td align='center' class='imgtd' id='m_"+t+"_"+i+"b' onmouseover='act_td("+t+","+i+");' onmouseout='nonact_td("+t+","+i+");'  oncontextmenu='swCM=0;eval(m"+t+"["+i+"][2]);' onclick='swCM=0;eval(m"+t+"["+i+"][2]);'> <img src='../../gfx/open_newwin.gif' width='12px' height='12px' alt='New window'></td>";
			}
		}
		StrAcum+="</TR>";
	}
	if(t==1){
		obj.style.height=(ContRows-1)*16-spacers*8+"px";
		th=obj.style.height.substr(0,obj.style.height.length-2);
	}
	
    }	
	StrAcum+="</TABLE>";
	document.all['teva'+t].innerHTML = StrAcum
}

function act_td(t,i){

window.clearTimeout(tid);
var obj=eval("m_"+t+"_"+i);
	if(obj.className=="tdmenu2"){
	  swjava = 1
	  return false
	}
	swjava = 0

	if(t==1) 
		hideSubMenu();
	else
		hideKnownSubMenu(t);
	obj.style.backgroundColor=bg_color_hl;
	obj.style.color=fg_color_hl;
	act1_td(eval(obj.id+"a"));

	act2_td(eval(obj.id+"b"));
}
function nonact_td(t,i){
var obj=eval("m_"+t+"_"+i);
if(obj.className=="tdmenu2"){
  swjava = 1
  return false
}
swjava = 0
	obj.style.backgroundColor=bg_color;
	obj.style.color=fg_color;
	nonact1_td(eval(obj.id+"a"));
	nonact2_td(eval(obj.id+"b"));
	//tid=setTimeout('showMenu("mousedown")',kto);
}

function act1_td(t){
var cel=eval(t);
var pix=eval(t.id+"p");
	if(pix.src!=myie.src)
		cel.style.border='1px outset';
	else{
		cel.style.border="1px solid "+bg_color_hl;
		cel.style.backgroundColor=bg_color_hl;
	}
}

function nonact1_td(t){
var cel=eval(t);
var pix=eval(t.id+"p");
	if(pix.src!=myie.src)
		cel.style.border="1px solid "+bg_color;
	else{
		cel.style.border="1px solid "+bg_color;
		cel.style.backgroundColor=bg_color;
	}
}
function act2_td(t){
var cel=eval(t);
var pix=eval(t.id+"p");
	cel.style.backgroundColor=bg_color_hl;
	if(cel.className!="emp") pix.src=myiw.src;
}

function nonact2_td(t){
var cel=eval(t);
var pix=eval(t.id+"p");
	cel.style.backgroundColor=bg_color;
	cel.style.color=fg_color;
	if(cel.className!="emp") pix.src=myi.src;
}

function showMenu(e){
   if (rsMath != null){
      co = rsMath.Get_Create_Entity(23,1,1)
}				   

   document.all['teva1'].innerHTML = co.return_value
	
if (sw1==0){
    hidemenu()
    return
}    



Selcheck2()
var valor =  ""
	if(llv==true)
		hideMenu();
	else{
		clearTimeout(tid);
		var aw = document.body.clientWidth-event.clientX;
		var ah = document.body.clientHeight-event.clientY;
		
		if (aw < teva1.offsetWidth)
			teva1.style.left = document.body.scrollLeft + event.clientX - teva1.offsetWidth;
		else
			teva1.style.left = document.body.scrollLeft + event.clientX;
			
		if (ah < teva1.offsetHeight)
			teva1.style.top = document.body.scrollTop + event.clientY - teva1.offsetHeight;
		else
			teva1.style.top = document.body.scrollTop + event.clientY;
		teva1.style.visibility='visible';
		llv=true;
		tid=window.setTimeout("hideMenu()",kto);
}

var obj	,j,texto
var arr_element = valor.split(',');
for(j=0;j<m1.length;j++){
   obj=eval("document.all.m_1_"+j);	
   if(obj){ 
      obj.className = "tdmenu"
      obj.style.color= "#000000";
   }    

   texto=m1[j]
   if(texto){
      texto = texto.toString();
     if(texto.search("calcular_regla")!=-1){
     	if(arr_element.length!=1){
		for(i=0; i<(arr_element.length); i++){
			if(arr_element[i]!=''){
			   if(texto.search(arr_element[i])==-1){
			      if(obj){
			        obj.className = "tdmenu2"
			        obj.style.color= "#666666";
			     }   
			   }
			}
		}
	}else{
	      if(obj) {
	        obj.className = "tdmenu2"
	        obj.style.color= "#666666";
	     }   
	}
    }	
   }
}	
}

function clearArray(){
	for(jj=0;jj<m1.length;jj++){
		m1[jj] = Array("","","");
	}
	for(jj=0;jj<m11.length;jj++){
		m11[jj] = Array("","","");
	}
	for(jj=0;jj<m12.length;jj++){
		m12[jj] = Array("","","");
	}
	for(jj=0;jj<m13.length;jj++){
		m13[jj] = Array("","","");
	}

	for(jj=0;jj<m14.length;jj++){
		m14[jj] = Array("","","");
	}

}

function ChargeIframeMenu(e){
   if (sw1==0){
      hidemenu()
      return
   } 
   document.frames['FrameTempLoad'].location.href='../aspx/Add_object_button_Right.aspx?IdEntityActive='+IdEntityActive	
   return
}

function ChargeIframeMenuLogin(e){
   document.frames['FrameTempLoad'].location.href='../aspx/Add_object_button_Right.aspx?IdEntityActive='+IdEntityActive+'&Action=ButtonLogin'	
   return
}



function showMenu3(e,TypeEntity,Roles,clasesprohibidas,dominio,path){
var sw1,sw11,sw12
if (sw1==0){
    hidemenu()
    return
} 

swCM = 1
clearArray()
var TypeEntityActive = 0
var IconoFunc = ""
var path = "/files/file_"+dominio+"/"+path+"/"
var indice = 1
var indice11 = 1

	for(i=0; i<(document.frames['FrameTempLoad'].AA.length); i++){
	  IconoFunc = "../../admin_h2/mostrar_imagen_objeto.asp?img=icon&id_entity="+document.frames['FrameTempLoad'].AA[i][2]+"&id_domain=2"
	  if(document.frames['FrameTempLoad'].AA[i][0]!=''){	
		  if(document.frames['FrameTempLoad'].AA[i][2]=='0' || document.frames['FrameTempLoad'].AA[i][2]=='1'){
		  	if(document.frames['FrameTempLoad'].AA[i][2]=='0')
		  		m1[indice] = new Array(document.frames['FrameTempLoad'].AA[i][0]+arr,"../../gfx/spacer.gif","13");
		  	else	
		  		m1[indice] = new Array(document.frames['FrameTempLoad'].AA[i][0]+arr,"../../gfx/spacer.gif","14");
		  	
		  }else{
			m1[indice] = new Array(document.frames['FrameTempLoad'].AA[i][0],IconoFunc,"ExecAction('"+document.frames['FrameTempLoad'].AA[i][1]+"',"+document.frames['FrameTempLoad'].AA[i][3]+","+document.frames['FrameTempLoad'].AA[i][2]+")");
		  }	
		indice++
		sw1 = 1
	  }	
	}

	
	if(document.frames['FrameTempLoad'].AA11.length>0){
		m1[indice] = new Array("Mas"+arr,"../../gfx/spacer.gif","11");
		indice++
	
		for(i=0; i<(document.frames['FrameTempLoad'].AA11.length); i++){
		   if(document.frames['FrameTempLoad'].AA11[i][0]!=''){		
		   	IconoFunc = "../../admin_h2/mostrar_imagen_objeto.asp?img=icon&id_entity="+document.frames['FrameTempLoad'].AA11[i][2]+"&id_domain=2"
			m11[indice11] = new Array(document.frames['FrameTempLoad'].AA11[i][0],IconoFunc,"ExecAction('"+document.frames['FrameTempLoad'].AA11[i][1]+"',"+document.frames['FrameTempLoad'].AA11[i][3]+","+document.frames['FrameTempLoad'].AA11[i][2]+")");
			indice11++
			sw11 = 1
		   }	
		}
	}	

	
	var indice12 = indice11
	for(i=0; i<(document.frames['FrameTempLoad'].AA12.length); i++){
	    if(document.frames['FrameTempLoad'].AA12[i][0]!=''){			
	    	IconoFunc = "../../admin_h2/mostrar_imagen_objeto.asp?img=icon&id_entity="+document.frames['FrameTempLoad'].AA12[i][2]+"&id_domain=2"
		m11[indice12] = Array(document.frames['FrameTempLoad'].AA12[i][0],IconoFunc,"go_relacionados_SV('1-"+document.frames['FrameTempLoad'].AA12[i][2]+"','"+document.frames['FrameTempLoad'].AA12[i][1]+"',"+document.frames['FrameTempLoad'].AA12[i][3]+")");
		indice12++
		sw12 = 1
	   }	
	}
	
	var indice13 = 1
	for(i=0; i<(document.frames['FrameTempLoad'].AA13.length); i++){
	    if(document.frames['FrameTempLoad'].AA13[i][0]!=''){
	    	IconoFunc = "../../admin_h2/mostrar_imagen_objeto.asp?img=icon&id_entity="+document.frames['FrameTempLoad'].AA13[i][2]+"&id_domain=2"			
		m13[indice13] = Array(document.frames['FrameTempLoad'].AA13[i][0],IconoFunc,"go_relacionados_SV('1-"+document.frames['FrameTempLoad'].AA13[i][2]+"','"+document.frames['FrameTempLoad'].AA13[i][1]+"',"+document.frames['FrameTempLoad'].AA13[i][3]+")");
		indice13++
		sw12 = 1
	   }	
	}	
	
	var indice14 = 1
	for(i=0; i<(document.frames['FrameTempLoad'].AA14.length); i++){
	    if(document.frames['FrameTempLoad'].AA14[i][0]!=''){
	    	IconoFunc = "../../admin_h2/mostrar_imagen_objeto.asp?img=icon&id_entity="+document.frames['FrameTempLoad'].AA14[i][2]+"&id_domain=2"			
		m14[indice14] = new Array(document.frames['FrameTempLoad'].AA14[i][0],IconoFunc,"ExecAction('"+document.frames['FrameTempLoad'].AA14[i][1]+"',"+document.frames['FrameTempLoad'].AA14[i][3]+","+document.frames['FrameTempLoad'].AA14[i][2]+")");
		indice14++
	   }	
	}	

	
		initMenu2(1)
		initMenu2(11)
		initMenu2(12)
		initMenu2(13)
		initMenu2(14)
	
	if(llv==true)
		hideMenu();
	else{
		clearTimeout(tid);
		
		var aw = document.body.clientWidth//-event.clientX;
		var ah = document.body.clientHeight//-event.clientY;
		
		teva1.style.left = x
		teva1.style.top  = y
		teva1.style.visibility='visible';
		llv=true;
		tid=window.setTimeout("hideMenu()",kto);
	}	


}


function showMenu4(e,iddomain){
if (sw1==0){
    hidemenu()
    return
} 	
	var indice = 1
	for(i=0; i<(document.frames['FrameTempLoad'].AA.length); i++){
		if(i==1){
		  if(document.frames['FrameTempLoad'].AA[i][3]==1)	
			m1[indice] = new Array(document.frames['FrameTempLoad'].AA[i][0],'../../gfx/1x1.gif',"redirect_builder('"+iddomain+"')");
		  else
		  	m1[indice] = new Array(document.frames['FrameTempLoad'].AA[i][0],'../../gfx/1x1.gif',"");
			
		}else
			m1[indice] = new Array(document.frames['FrameTempLoad'].AA[i][0],'../../gfx/1x1.gif',"Go_Login('"+iddomain+"')");
		indice++
	}
	NewWin = 1
	initMenu2(1)
	


	if(llv==true)
		hideMenu();
	else{
		clearTimeout(tid);
		
		var aw = document.body.clientWidth//-event.clientX;
		var ah = document.body.clientHeight//-event.clientY;
		
		teva1.style.left = x
		teva1.style.top  = y
		teva1.style.visibility='visible';
		llv=true;
		tid=window.setTimeout("hideMenu()",kto);
	}	
	NewWin = 0
	
}

// ...........
function showSubMenu(c,t,y){
clearTimeout(tid);
var tobj=eval("teva"+c);
var obj=eval("teva"+t);
var ox=tobj.style.left.substr(0,tobj.style.left.length-2); 
var oy=tobj.style.top.substr(0,tobj.style.top.length-2); 
var oh=obj.style.height.substr(0,obj.style.height.length-2);
var ow=obj.style.width.substr(0,obj.style.width.length-2);

	if(vas==0){
		if(Math.round(ox) > Math.round(document.body.clientWidth)-Math.round(ow)*2-10)
			obj.style.left=Math.round(ox)-Math.round(ow)+2;
		else
			obj.style.left=Math.round(ox)+Math.round(ow)-5;
	}else
		obj.style.left=Math.round(ox)-Math.round(ow)+2;
	if(Math.round(oy)+Math.round(y) < Math.round(document.body.clientHeight)-Math.round(oh))
		obj.style.top=Math.round(oy)+Math.round(y);
	else
		obj.style.top=Math.round(oy)+Math.round(y);
	obj.style.visibility='visible';
	ksm=t;
}
//...............
function hideMenu(){
	clearTimeout(tid);
	teva1.style.visibility='hidden';
	hideSubMenu();
	llv=false;

}
//.................

function hideSubMenu(){
var obj;
	for(j=1;j<mvect.length;j++){
		obj=eval("teva"+mvect[j]);
		obj.style.visibility='hidden';
	}
}
//.................
function hideKnownSubMenu(t){
	if(ksm>0 && ksm!=t){
var obj;
		for(j=1;j<mvect.length;j++){
			if(mvect[j]>t){
				obj=eval("teva"+mvect[j]);
				obj.style.visibility='hidden';
			}
		}
		ksm=0;
	}
}

function goto(url){
window.location=url
}
//...............

function go_relacionados_SV(ObjObligatorio,idCE,TypeEntity){
	var  arr_element = ObjObligatorio.split('-');
	if(arr_element[0]=='')
	   	return
	if(arr_element[0]==1)
		MM_openBrWindow('../asp/view_entity-10001.asp?SWResponse=1&proceso_entity=1&intEntityAttributesClassId='+idCE+'&type_entity='+arr_element[1]+'&Action=Guardar&from_entity='+IdEntityActive+'&type_from='+TypeEntity+'&vent=yes','Agregar','resizable=yes,menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,top=0,left=0,directories=no,width=screen.Width(),height=screen.Height()')
	else
		MM_openBrWindow('../asp/index_view_entity-grid-10001.asp?proceso_entity=1&type_entity='+arr_element[1]+'&Action=Guardar&from_entity='+IdEntityActive+'&type_from='+TypeEntity+'&vent=yes','Agregar','resizable=yes,menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,top=0,left=0,directories=no,width=screen.Width(),height=screen.Height()')

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function ExecAction(id,TypeEntity,TypeAction){
	if(swCM==0){
	   ExecActionNewWin(id,TypeEntity,TypeAction)
	   hideMenu;
	   return false;	   
	}   
	if(TypeAction != 39 && TypeAction != 48 && TypeAction != 49 && TypeAction != 61 && TypeAction != 62 && TypeAction != 63 && TypeAction != 60){
		var StrTypeEntity = '1-'+TypeAction
		go_relacionados_SV(StrTypeEntity,id,TypeEntity)
	}
	
	if(TypeAction==39) calcular_regla(id)
	if(TypeAction==48) UpdateEntity(id,TypeEntity)
	if(TypeAction==49) parent.location.href = "../aspx/showview_class_structured.aspx?ModeInterfaz=view&proceso_entity=1&Action=Guardar&type_entity="+TypeEntity+"&intEntityAttributesClassId="+id
	if(TypeAction==61) duplicar(document.formulario.IdEntity.value,document.formulario.IdDominio.value)
	if(TypeAction==62) H2Export()
	if(TypeAction==63) window.print()
	if(TypeAction==60){
	   if(document.formulario.CantRows)
		delete_entity(document.formulario.CantRows.value, 'delete')
	   else
	   	delete_entity()
	}
	swCM=1;
	hideMenu;
	return false;	
}

function ExecActionNewWin(id,TypeEntity,TypeAction){
	if(TypeAction != 39 && TypeAction != 48 && TypeAction != 49 && TypeAction != 61 && TypeAction != 62 && TypeAction != 63 && TypeAction != 60){
		var StrTypeEntity = '1-'+TypeAction
		go_relacionados_SV(StrTypeEntity,id,TypeEntity)
	}
	if(TypeAction==39) calcular_reglaNewWin(id)
	if(TypeAction==48) UpdateEntityNewWin(id,TypeEntity)
	if(TypeAction==49) window.open("../aspx/showview_class_structured.aspx?ModeInterfaz=view&proceso_entity=1&Action=Guardar&type_entity="+TypeEntity+"&intEntityAttributesClassId="+id)
	if(TypeAction==61) duplicar(document.formulario.IdEntity.value,document.formulario.IdDominio.value)
	if(TypeAction==62) H2Export()
	if(TypeAction==63) window.print()
	if(TypeAction==60){
	   if(document.formulario.CantRows)
		delete_entity(document.formulario.CantRows.value, 'delete')
	   else
	   	delete_entity()
	}
	swCM=1;
	hideMenu();
}
function  (id,typeent){
    if(parent.frames['f6'])
	parent.frames['f6'].location.href="../aspx/showview_class_structured.aspx?SWResponse=1&ModeInterfaz=view&proceso_entity=1&Action=edit&type_entity="+typeent+"&intEntityAttributesClassId="+id+"&IdEntity="+IdEntityActive
    else
        parent.location.href="../aspx/showview_class_structured.aspx?SWResponse=1&ModeInterfaz=view&proceso_entity=1&Action=edit&type_entity="+typeent+"&intEntityAttributesClassId="+id+"&IdEntity="+IdEntityActive	
}
function calcular_regla(id){
	document.formulario.action = document.location + "&idrule=" + id;
	document.formulario.strProcessAction.value = 'RUN_RULE';
	document.formulario.submit();
}
function calcular_reglaNewWin(id){
	document.formulario.target="_blank"
	document.formulario.action = document.location + "&idrule=" + id;
	document.formulario.strProcessAction.value = 'RUN_RULE';
	document.formulario.submit();
}
function UpdateEntityNewWin(id,typeent){
	//opener.location.href="../aspx/showview_class_structured.aspx?SWResponse=1&ModeInterfaz=view&proceso_entity=1&Action=edit&type_entity="+typeent+"&intEntityAttributesClassId="+id+"&IdEntity="+IdEntityActive
	window.open("../aspx/showview_class_structured.aspx?SWResponse=1&ModeInterfaz=view&proceso_entity=1&Action=edit&type_entity="+typeent+"&intEntityAttributesClassId="+id+"&IdEntity="+IdEntityActive)
}
function UpdateEntity(id,typeent){
    if(parent.frames['f6'])
	parent.frames['f6'].location.href="../aspx/showview_class_structured.aspx?SWResponse=1&ModeInterfaz=view&proceso_entity=1&Action=edit&type_entity="+typeent+"&intEntityAttributesClassId="+id+"&IdEntity="+IdEntityActive
    else
        parent.location.href="../aspx/showview_class_structured.aspx?SWResponse=1&ModeInterfaz=view&proceso_entity=1&Action=edit&type_entity="+typeent+"&intEntityAttributesClassId="+id+"&IdEntity="+IdEntityActive	
}
function go_url(url){
 parent.location.href = '../asp/' +  url + IdEntityActive
}

function go_url2(url){ 
 window.open('../asp/' +  url + IdEntityActive)
}
function Selcheck(){
	if(document.formulario.intEntityId.length>1){
		for (var i=0;i < document.formulario.intEntityId.length;i++){
			document.formulario.intEntityId[i].checked=false
	        }
       	document.formulario.intEntityId[pos2-1].checked=true
       	IdEntity = document.formulario.intEntityId[pos2-1].value
       }else{
            document.formulario.intEntityId.checked=true
	     IdEntity = document.formulario.intEntityId.value
            }
}
function Selcheck2(){
	if(document.formulario.intEntityId.length>1){
		for (var i=0;i < document.formulario.intEntityId.length;i++){
			document.formulario.intEntityId[i].checked=false
	        }
       	IdEntity = document.formulario.intEntityId[pos2-1].value
       }else{
            document.formulario.intEntityId.checked=true
	     IdEntity = document.formulario.intEntityId.value
            }
}
function SetIdEntity(id){
	IdEntityActive = id
}




