/* 

 * File: dp.js

 * Desc: Main Javascript functions for row27

 * Auth: Calvin Lai

 * Copy: Copyright 2008

 *

 *////////////////////////////////////////////////*/





function hoverVid(id, status, isDesc, size){

	var divId = 'video-overlay-'+id;

	var descId = 'video-description-'+id;

	if(navigator.appName=="Microsoft Internet Explorer"){

		if(size == 'xlg'){

			$("#" + divId).css('marginLeft', '-770px');

		} else {

			$("#" + divId).css('marginLeft', '-500px');

		}

	}

	if(status=='on') {

		$("#" + divId).css('display', 'block');

		if(isDesc==true) {

			$("#" + descId).attr('class', 'font12 white');	

		}

	}

	else {

		$("#" + divId).css('display', 'none');

		if(isDesc==true) {

			$("#" + descId).attr('class', 'font12 grey');

		}

	}

}



function hoverImg(id, status, isDesc, size){

	var divId = 'img-overlay-'+id;

	var descId = 'img-description-'+id;

	if(navigator.appName=="Microsoft Internet Explorer"){

		if(size == 'xsm'){

			$(divId).css('marginLeft', '-260px');

		}

		else{

			$(divId).css('marginLeft', '-500px');

		}

	}

	if(status=='on') {

		$(divId).css('display', 'block');

		if(isDesc==true) {

			$(descId).attr('class', 'font12 white');	

		}

	}

	else {

		$(divId).css('display', 'none');

		if(isDesc==true) {

			$(descId).attr('class', 'font12 grey');

		}

	}

}



function highlightInput(obj, status){ //highlights an input box on focus

	var onColor = '#ffe2e5';

	var offColor = 'white';

	if(status=='on') {

		obj.style.backgroundColor = onColor;

		obj.style.borderBottom = '1px solid #000';

	}

	else {

		obj.style.backgroundColor = offColor;

		obj.style.borderBottom = '1px solid #a7a7a7';

	}

}

