// JavaScript Document
var origWidth, origHeight;
if (document.layers) {
    origWidth = window.innerWidth; origHeight = window.innerHeight;
    window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showhide(what){
if (what.style.display=='none') {
	what.style.display=''; }
else {
	what.style.display='none'; } }

function showLayer(id) {
  var lyr = getElemRefs(id);
    if (lyr && lyr.css) {
        lyr.css.visibility = "visible";
       }
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
    var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
    if (el) el.css = (el.style)? el.style: el;
    return el;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function setTitulos() {
var a = "Desarrollo para Medios, Productoras, Marketing";
var b = "Aplicaciones & Desarrollo & Media, .Net para Medios";
var c = "Sitios Web, Aplicaciones Cliente/Servidor, Programacion, Servicios Informaticos para Medios";
var t = new Date();
s = t.getSeconds();
if (s == 3) {
	document.title = a;}
	else if (s == 20) {
	document.title = b;}
	else if (s == 30) {
	document.title = c;}
	else if (s == 40) {
	document.title = a;}
	else if (s == 50) {
	document.title = b;}
	else if (s == 00) {
	document.title = c;}
	setTimeout("setTitulos()", 1000);
}

function funGuyty_Abrir_Ventana(strGuyty_Destino, strGuyty_Nombre_Ventana, intGuyty_Width, intGuyty_Heigth)
{
	window.open(strGuyty_Destino, strGuyty_Nombre_Ventana, 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=,'+intGuyty_Width+',height=,'+intGuyty_Heigth+', left=0,top=70')
}

function ficha()
{
window.open('ficha.aspx', 'ficha', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=500,height=300, left=0,top=70')
}

function abrir_cv(destino)
{
window.open(destino, 'ficha', 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=600,height=250, left=0,top=70')
}

abrir_cv

function funGuytyagregarFavoritos(){
   if ((navigator.appName=="Microsoft Internet Explorer") && 
         (parseInt(navigator.appVersion)>=4)) {
      var url="http://www.tu-sitio.com/"; 
      var titulo="Nombre del Sitio";
      window.external.AddFavorite(url,titulo);
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
   }
} 

function funGuyty_Quitar_Marco_Swf() {
objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++) {
    objects[0].outerHTML = objects[0].outerHTML;
    }
}

function funGuyty_nieve() { 

}

function StartExcel() { 
    var oExcel; 
    oExcel = new ActiveXObject("Excel.Application"); 
    oWkBooks = oExcel.Workbooks.Add;
    oExcelSheet = oWkBooks.Worksheets(1);
    oExcelSheet.Activate();
   oExcelSheet.Application.Visible = true; 
    oExcel = null;
//    oExcel.Quit();
//    idTmr = window.setInterval("Cleanup();",1);
} 

function querySt(ji) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
		return ft[1];
		}
	}
}

//var koko = querySt("koko");
//document.write(koko);
//document.write("<br>");
//document.write(hu);

//  function Cleanup() {
//    window.clearInterval(idTmr);
//   CollectGarbage();
//  }
   
//    oExcel.Quit(); 
//    oExcel = null; 
//function exportToXL(eSrc) {
//var oExcel;    
//var oExcelSheet;  
//var oWkBooks;
//var cols; 
//oExcel = new ActiveXObject('Excel.Application');
//oWkBooks = oExcel.Workbooks.Add;
//oExcelSheet = oWkBooks.Worksheets(1);
//oExcelSheet.Activate();
//    if (eSrc.tagName != 'TABLE') {
//  alert('No ha sido posible exportar la tabla a excell');
//  return false;
//}
//cols = Math.ceil(eSrc.cells.length / eSrc.rows.length);
//    for (var i = 0; i < eSrc.cells.length; i ++)
//{
//var c, r;
//  r = Math.ceil((i+1) / cols);
//  c = (i+1)-((r-1)*cols)
//  if (eSrc.cells(i).tagName == 'TH') {  
//    oExcel.ActiveSheet.Cells(r,c).Font.Bold = true;
//    oExcel.ActiveSheet.Cells(r,c).Interior.Color = 14474460; 
//  }
//  if (eSrc.cells(i).childNodes.length > 0 && eSrc.cells(i).childNodes(0).tagName == "B") 
//    oExcel.ActiveSheet.Cells(r,c).Font.Bold = true;
//  oExcel.ActiveSheet.Cells(r,c).Value = eSrc.cells(i).innerText;
//}
//oExcelSheet.Application.Visible = true;
//}
