function ChangeColor(color)
{
if (document.getElementById('newsTD1'))
{
document.getElementById('newsTD1').style.backgroundcolor=color;
}
if (document.getElementById('newsTD2'))
{
document.getElementById('newsTD2').style.backgroundcolor=color;
}
}

// * Dependencies * 

// this function requires the following snippet:

// JavaScript/readable_MM_functions/findObj

function setColor(objName, fg, bg)

{

  obj = findObj(objName);

  if (obj.style)

  {

    obj.style.color = fg;

    obj.style.backgroundColor = bg;

  }

}
// Example: obj = findObj("image1");

function findObj(theObj, theDoc)

{

  var p, i, foundObj;

  

  if(!theDoc) theDoc = document;

  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)

  {

    theDoc = parent.frames[theObj.substring(p+1)].document;

    theObj = theObj.substring(0,p);

  }

  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];

  for (i=0; !foundObj && i < theDoc.forms.length; i++) 

    foundObj = theDoc.forms[i][theObj];

  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 

    foundObj = findObj(theObj,theDoc.layers[i].document);

  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  

  return foundObj;

}
var TableOpId=0;
function chowrecord(id){

  if( TableOpId !=0)
	{
		if (document.getElementById("table"+TableOpId))
		{
		 document.getElementById("table"+TableOpId).style.display='none';
		}
	}
	if (document.getElementById("table"+id))
		{
	 document.getElementById("table"+id).style.display='block';
		}
	TableOpId=id;
	}

function ChangeTitle(text) {
   //var newtitle = document.form1.newtitle.value;
   var head1 = document.getElementById("head1");
   head1.firstChild.nodeValue=text;
}

	function checkform(){
		var message = "";

		if (document.formKoein.ContactName.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Contact Name \n";
			}

		if (document.formKoein.Comments.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Comments box \n";
			}

		if (document.formKoein.Country.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Country  \n";
			}

		if (document.formKoein.email.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Email \n";
			}

		
		

		if(message.length > 0) {
			alert(message);
			return false;
			}
		else{
			return true;
			}
	}
function PassFlash(mousOut,update){
    if(update == 1){
	//window.document.movie.SetVariable("prod", iprd);
	if(window.sample) 
		{
		window.document["sample"].SetVariable("mousOut", mousOut);
		}
	else if (document.sample)
		{
		document.sample.SetVariable("mousOut", mousOut);
		}
	}
	setNewColor1();setNewColor2();
	}
	var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

{

  if(popUpWin)

  {

    if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

function openpopup(url) {
 popUpWindow(url,10,10,660,500)
}
var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

{

  if(popUpWin)

  {

    if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}
function ShowTable(id) {
lencheck=document.getElementById("nombreProducts").value;

 if (lencheck>=1)
	 {
	  for (i=1;i<=lencheck; i++)
	   if (document.getElementById("Product"+i) != null )  {
		  document.getElementById("Product"+i).style.display="none"
		  
		}
	   }
	   document.getElementById(id).style.display="block";
}	 

