function mOvr(src,clrOver)
	{
	if (!src.contains(event.fromElement))
		{
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
		}
	}

function mOut(src,clrIn)
	{
	if (!src.contains(event.toElement))
		{
		src.style.cursor = 'default';
		src.bgColor = clrIn;
		}
	}

function mClk(src)
	{
	//alert(event.srcElement.children.tags('A')[0]);
	if(event.srcElement.tagName=='TD')
		{
		Event.srcElement.children.tags('A')[0].click();
		//src.children.tags('A')[0].click();
		}
	}

function Ayuda()
	{
	alert('Ayuda:\r\nPara obtener ayuda puede comunicarse al número: 001 305-532-7950\r\nInternos: 29 Verónica Balasino ó Interno 57 Charlie Kiss');
	}

function checkBrowser()
	{
	var browser = new String(navigator.appName);
	var broserName = "MSIE";
	if (browser.indexOf("Gecko")!=-1)
		{
		broserName = "Mozilla";	
		}
	if (browser.indexOf("MSIE")!=-1)
		{
		broserName = "MSIE";	
		}
	return broserName;
	}

function SetDIV(capa,valor,browser)
	{
	var cadena1;
	if (browser=="MSIE")
		{
		divref=(document.all)?"":"document.";
		stlref=(document.all)?"style.":"";
		cadena1 = divref+capa+"."+stlref+"display='"+valor+"'";
		eval(cadena1);
		}
	if (browser=="Mozilla")
		{
		document.getElementById(capa).style.display=valor;
		}
	}

function nuevoAjax()
	{
	var xmlhttp=false;
	try
		{
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
	catch (e)
		{
		try
			{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
		catch (E)
			{
			xmlhttp = false;
			}
		}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined')
		{
		xmlhttp = new XMLHttpRequest();
		}
	return xmlhttp;
}

function LoadContent(archivo,container)
	{
	var contenedor;
	contenedor = document.getElementById(container);
	ajax=nuevoAjax();
	ajax.open("GET", archivo,true);
	ajax.onreadystatechange=function()
		{
		if (ajax.readyState==4)
			{
			contenedor.innerHTML = ajax.responseText
			}
		}
	ajax.send(null)
	}

function SetElement(_ElementID,_value)
	{
	document.getElementById(_ElementID).disabled=_value;
	}


function AuxWin(URL,w,h)
	{
	window.open(URL, 'Auxiliar_Windows', 'width='+w+', height='+h+', resizable=yes, scrollbars=yes, toolbar=no, status=no');	
	}

function AuxFixedWin(URL,w,h)
	{
	window.open(URL, 'Auxiliar_Windows', 'width='+w+', height='+h+', resizable=no, scrollbars=yes, toolbar=no, status=no');	
	}


function addbookmark()	
	{
	var browserName = checkBrowser();
	if (browserName=="MSIE")
		{
		window.external.AddFavorite("http://www.suprafon.com/","Suprafon S.A. - la telefonia del futuro, hoy") 
		}
	else
		{
		alert("Presione Ctrl+D para agregar este sitio a sus favoritos\n\nGracias\n\nSuprafon S.A.");	
		}
	}

function viewCart()
	{
	location.href='cart.php?method=viewCart';
	}

function checkout()
	{
	location.href='cart.php?method=checkout';
	}

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

function getMouseXY(e)
	{
	if (IE)
		{
		// grab the x-y pos.s if browser is IE
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
		}
	else
		{  // grab the x-y pos.s if browser is NS
		tempX = e.pageX;
		tempY = e.pageY;
		}  
  
  	// catch possible negative values in NS4
	if (tempX < 0){tempX = 0}
  	if (tempY < 0){tempY = 0}  
	// show the position values in the form named Show
	// in the text fields named MouseX and MouseY
	document.getElementById('xPos').value = tempX;
	document.getElementById('yPos').value = tempY;
	window.status='X:'+document.getElementById('xPos').value+' - Y:'+document.getElementById('yPos').value;
	}


function validateEmail(objeto)
	{
	if (objeto.value.indexOf("@")==-1&&objeto.value.indexOf(".")==-1)
		{
		return false;
		}
	else
		{
		return true;	
		}
	}

function exit()
	{
	var rta = confirm("Exit from your account?");
	if (rta==true)
		{
		location.href='goodbye.php';	
		}
	}
