
// JavaScript Document
// OVER NHIEU HINH KHONG CO HIEU UNG
function ChangeImage(name,image)
{
	document[name].src=image
}

function Moveover50(that)
{
that.style.backgroundImage='url(Images/b_brow_50.gif)';
that.style.color='#FFFF00';
that.style.fontWeight='bold';
that.style.border='0px outset #FFFFFF';
that.style.letterSpacing='0.1mm';
}
function Moveout50(that)
{
that.style.backgroundImage='url(Images/b_brow_50.gif)';
that.style.color='#FFFFFF';
that.style.fontWeight='bold';
that.style.border='0px solid #FFFFFF';
that.style.letterSpacing='0mm';
}

function Moveover75(that)
{
that.style.backgroundImage='url(Images/b_brow_75.gif)';
that.style.color='#FFFF00';
that.style.fontWeight='bold';
that.style.border='0px outset #FFFFFF';
that.style.letterSpacing='0.1mm';
}
function Moveout75(that)
{
that.style.backgroundImage='url(Images/b_brow_75.gif)';
that.style.color='#FFFFFF';
that.style.fontWeight='bold';
that.style.border='0px solid #FFFFFF';
that.style.letterSpacing='0mm';
}

function Moveover85(that)
{
that.style.backgroundImage='url(Images/b_brow_85.gif)';
that.style.color='#FFFF00';
that.style.fontWeight='bold';
that.style.border='0px outset #FFFFFF';
that.style.letterSpacing='0.1mm';
}
function Moveout85(that)
{
that.style.backgroundImage='url(Images/b_brow_85.gif)';
that.style.color='#FFFFFF';
that.style.fontWeight='bold';
that.style.border='0px solid #FFFFFF';
that.style.letterSpacing='0mm';
}

function Moveover130(that)
{
that.style.backgroundImage='url(Images/b_brow_130.gif)';
that.style.color='#FFFF00';
that.style.fontWeight='bold';
that.style.border='0px outset #FFFFFF';
that.style.letterSpacing='0.1mm';
}
function Moveout130(that)
{
that.style.backgroundImage='url(Images/b_brow_130.gif)';
that.style.color='#FFFFFF';
that.style.fontWeight='bold';
that.style.border='0px solid #FFFFFF';
that.style.letterSpacing='0mm';
}

function Moveover75b(that)
{
that.style.backgroundImage='url(Images/b_blue_75.gif)';
that.style.color='#FFFF00';
that.style.fontWeight='bold';
that.style.border='0px outset #FFFFFF';
that.style.letterSpacing='0.1mm';
}
function Moveout75b(that)
{
that.style.backgroundImage='url(Images/b_blue_75.gif)';
that.style.color='#FFFFFF';
that.style.fontWeight='bold';
that.style.border='0px solid #FFFFFF';
that.style.letterSpacing='0mm';
}

// OVER BACKGROUND COLOR

var preloadFlag = false;

function newImage(source)
{
	if (document.images)
	{
		result = new Image();
		result.src = source;
		return result;
	}
}

function changeImages()
{
	if (document.images && preloadFlag)
	{
		for (var i = 0; i < changeImages.arguments.length; i += 2)
		{
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function preloadImages()
{
	if (document.images)
	{
		preloadFlag = true;
	}
}

function navRollOver(obj, state) {
  document.getElementById(obj).className = (state == 'on') ? 'nav-over' : 'nav';
}

// OVER HINH CO HIEU UNG SAND
//Generate transition CSS (transition=0 to 23)
document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.4,transition=12) }</STYLE>');

//Uncomment the next line for fading rollovers instead of dissolving:
//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=0.4) }</STYLE>');

var onImages=new Array();
function Rollover(imgName, imgSrc)
{
onImages[imgName] = new Image();
onImages[imgName].src = imgSrc;
}

function turnOn(imgName){ 
if(document.images[imgName].filters != null)
document.images[imgName].filters[0].apply();
document.images[imgName].offSrc = document.images[imgName].src;
document.images[imgName].src = onImages[imgName].src;
if(document.images[imgName].filters != null)
document.images[imgName].filters[0].play();
}

function turnOff(imgName){ 
if(document.images[imgName].filters != null)
document.images[imgName].filters[0].stop();
document.images[imgName].src = document.images[imgName].offSrc;
}

//Specify name of participating images, plus paths to their onMouseover replacements:
Rollover("home", "Images/b_home_over.gif");
Rollover("aboutus", "Images/b_aboutus_over.gif");
Rollover("theacceptteam", "Images/b_theacceptteam_over.gif");
Rollover("pastaccepttrips", "Images/b_pastaccepttrips_over.gif");
Rollover("programleaders", "Images/b_programleaders_over.gif");
Rollover("testimonies", "Images/b_testimonies_over.gif");
Rollover("historyofcambodia", "Images/b_historyofcambodia_over.gif");
Rollover("photos", "Images/b_photos_over.gif");
Rollover("links", "Images/b_links_over.gif");
Rollover("contactus", "Images/b_contactus_over.gif");

function openImage(url, vHeight, vWidth)
{
	winDef = 'status=no,resizable=no,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(vHeight).concat(',').concat('width=').concat(vWidth).concat(',');
	winDef = winDef.concat('top=').concat((screen.height - vHeight)/2).concat(',');
	winDef = winDef.concat('left=').concat((screen.width - vWidth)/2);
	newwin = open('', '_blank', winDef);
	newwin.document.writeln('<title>View large picture - ACCEPT Foundation</title>');
	newwin.document.writeln('<body topmargin="3" leftmargin="3" marginheight="3" marginwidth="3" bgcolor="#EEECEC">');
	newwin.document.writeln('<a href="JavaScript:window.close()"><img src="', url, '" alt="CLOSE" border=0 style="border:1px solid #FF9900"></a>');
	newwin.document.writeln('</body>');
}

