var ie4 = false; if(document.all) { ie4 = true; }
function getobject(id) { 
  if (ie4) { 
    return document.all[id]; 
  }else { 
    return document.getElementById(id); 
  }
}

function changecss(num){
	getobject('css').href="styles"+num+".css";
}

function flip(th){
	par=th.parentNode.parentNode.className;
	getstyleatt=th.parentNode.parentNode.innerHTML;
	if(par){
		parspilt=par.split(' ');
		classname=parspilt[0];
		if(classname=="box_header"){
			if(getstyleatt.indexOf("style=")==-1) th.style.backgroundImage="url(images/bullet_top.gif)"; }else{ 
			if(getstyleatt.indexOf("style=")==-1) th.style.backgroundImage="url(images/bullet_down.gif)"; }
	}
	if(th.style.backgroundImage=="url(images/bullet_down.gif)"){
	th.style.backgroundImage="url(images/bullet_top.gif)"; th.title="Expander";  }else{
	th.style.backgroundImage="url(images/bullet_down.gif)"; th.title="Contraer"; }
}

function ajaxContact(){
	
	if(getobject("f_name").value==""||getobject("f_email").value==""||getobject("f_phone").value==""||getobject("f_comments").value==""){
		alert("Por favor complete todos los campos.");
		return false;
	}
	
	getobject("status").className="statusstyle2";
	
	
}	

function show_hide_obj(arr) {
	var arrsplit = arr.split(",");
	for (i=0; i < arrsplit.length; i++) {
		var item_tr = getobject(arrsplit[i]);
		if (item_tr) { 
			if(item_tr.style.display=="none"){
				item_tr.style.display = "";
			} else {
				item_tr.style.display = "none";
			}
		}
	}
}

function winz(url, w, h) {
	
  var l = (screen.availWidth-10 - w) / 2;
  var t = (screen.availHeight-20 - h) / 2;  

  var features = "width="+w+",height="+h+",left="+l+",top="+t;
  features += ",screenX="+l+",screenY="+t;
  features += ",scrollbars=0,resizable=0,location=0";
  features += ",menubar=0,toolbar=0,status=0";

  window.open(url, "", features);

}

function changePicture(rute,title){
	document.getElementById("bo").innerHTML='<img src="admin/imgres.php?img='+rute+'&amp;max=390" title="'+title+'" alt="'+title+'">';	
}

// -----------------------------------------------------------------
   
hs.graphicsDir = 'highslide/graphics/';
hs.outlineType = 'rounded-white';
window.onload = function() {
	hs.preloadImages(5);
}