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_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*
function SetHeight(){
function getFlashObj(movie){
   if (window.document[movie]) {
	  return window.document[movie];
   }
   if (navigator.appName.indexOf("Microsoft Internet")==-1) {
	  if (document.embeds && document.embeds[movie]) {
		 return document.embeds[movie]; 
	  }
   } else {
	  return document.getElementById(movie);
   }
}
SetPageWidth();
var TotalMoveOjects = 0
var movieObj = getFlashObj("showcase");
movieObj.style.height=movieObj.offsetWidth/490*245;
movieObj.height=movieObj.offsetWidth/490*245;
movieObj.style.visibility="visible";
//alert(movieObj.offsetHeight);
}
function SetHeightFront(){
SetFrontPageWidth();
for(i=1;i<TotalMoveOjects;i++){
	//var objFlash = MM_findObj("test");
	function getFlashObj(movie){
	   if (window.document[movie]) {
		  return window.document[movie];
	   }
	   if (navigator.appName.indexOf("Microsoft Internet")==-1) {
		  if (document.embeds && document.embeds[movie]) {
			 return document.embeds[movie]; 
		  }
	   } else {
		  return document.getElementById(movie);
	   }
	}
	
	var movieObj = getFlashObj("showcase"+i);
	movieObj.style.height=movieObj.offsetWidth/220*100;
	movieObj.height=movieObj.offsetWidth/220*100;
	movieObj.style.visibility="visible";
	//alert(movieObj.offsetHeight);
	}
	}
	function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
	return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
	if (document.embeds && document.embeds[movieName])
	  return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
	return document.getElementById(movieName);
  }
}




function SetPageWidth(){
	if(document.body.clientWidth>1000){
		var PageWidth=1000;
		var PageString="px"
	}else{
		var PageWidth=document.body.clientWidth;
		var PageString="px"
	}
	var TheDiv = document.getElementById('SearchRow');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('LogoRow');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('Menu');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('ContentCell');
	TheDiv.style.width = (PageWidth-14)+PageString;
	TheDiv = document.getElementById('PageTable');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('Footer');
	TheDiv.style.width = PageWidth+PageString;
}
function SetFrontPageWidth(){
	if(document.body.clientWidth>1000){
		var PageWidth=1000;
		var PageString="px"
	}else{
		var PageWidth=document.body.clientWidth;
		var PageString="px"
	}
	var TheDiv = document.getElementById('SearchRow');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('LogoRow');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('ShowcaseTable');
	TheDiv.style.width = PageWidth+PageString;
	TheDiv = document.getElementById('FeatureTable');
	TheDiv.style.width = PageWidth+PageString;
}

*/


function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function StopFlashMovie()
{
	var flashMovie=getFlashMovieObject("video1");
	if (document.getElementById('video1'))
	{	
		flashMovie.GotoFrame(2);
		flashMovie.StopPlay();
	}
}

function PlayFlashMovie()
{
	var flashMovie=getFlashMovieObject("video1");
	if (document.getElementById('video1'))
	{		
		flashMovie.Play();
	}
	//embed.nativeProperty.anotherNativeMethod();
}

function RewindFlashMovie()
{
	var flashMovie=getFlashMovieObject("video1");
	//flashMovie.Rewind();
	if (document.getElementById('video1'))
	{		
	flashMovie.Rewind();
	}
}

function closeFlash()
{
	var VideoDiv = document.getElementById('VideoDiv');
	var Video = document.getElementById('video1');
	if ((document.getElementById('VideoDiv')) &&(document.getElementById('video1')))
	{		
	StopFlashMovie();
	VideoDiv.style.width = '1px';	
	VideoDiv.style.height = '1px';
	Video.style.left = '-900px';
	Video.style.top = '50px';
	//Video.style.width = '1px';	
	//Video.style.height = '364px';
	//Video.width = 1;	
	//Video.height = 1;
	}
}
function showFlash(videoname)
{
	var VideoDiv = document.getElementById('VideoDiv');
	var Video = document.getElementById('video1');
	if (document.getElementById('VideoDiv'))
	{
		VideoDiv.style.width = '100%';	
		VideoDiv.style.height = document.body.scrollHeight+'px';
		//alert(document.body.scrollWidth);
		Video.style.left = (document.body.scrollWidth-350)/2+'px';
		Video.style.top = '50px';	
		//Video.style.height = '364px';
		//Video.width = 350;	
		//Video.height = 364;
		StopFlashMovie();
		SendDataToFlashMovie(videoname);
		PlayFlashMovie();		
	}

}


function SendDataToFlashMovie(VarsToPars)
{
	var flashMovie=getFlashMovieObject("video1");
	if (document.getElementById('video1'))
	{		
	flashMovie.SetVariable("/:VariableToPars", VarsToPars);
	}
	
}


function refreshFlash(VarsToPars)
{
	SendDataToFlashMovie(VarsToPars);
	PlayFlashMovie();	
}


/*
function open_content_img(s_showcase)
{
	window.open('popup.asp?showcase=' + escape(s_showcase)+'&filelocation=' + escape('')+'&Desc=','','scrollbars=yes,resizable=yes,width=640,height=450');	
}
*/
function open_content_img(objImage)
{
	var anchor1 = document.getElementById('tempa');
	var imagesrc = objImage.replace('_cmsthumb','');
	anchor1.setAttribute('href',imagesrc);
	anchor1.setAttribute('rel','contentimage');	
	anchor1.setAttribute('title','');	
	myLightbox.start(anchor1); 
	return false;	
}

function goCreateAnchor(objImage)
{
	var anchor1 = document.getElementById('tempa');
	var imagesrc = objImage.src.replace('_cmsthumbclick','');
	anchor1.setAttribute('href',imagesrc);
	anchor1.setAttribute('rel','contentimage');	
	anchor1.setAttribute('title',objImage.alt);	
	myLightbox.start(anchor1); 
	return false;	
}