function ClearText(field) {
//alert("clearText");
var inp = document.getElementById(field);
if((inp.value== "That's Expired !") || (inp.value=="That's Expired!") || (inp.value=="That's Invalid!") || (inp.value=="That's Invalid !") || (inp.value=="That's Used Up!")){
	inp.value = '';
}
//setStyle(inp,'color','000000');
inp.style.color = "black";
}

function setText(){
	
	//alert("setText");
	var inp = document.getElementById('txtPromo');
	//alert(inp);
	
	if(inp==null)
	return;
	
	if(inp!=null && (inp.value== "That's Expired !") || (inp.value=="That's Expired!") || (inp.value=="That's Invalid!") || (inp.value=="That's Invalid !") || (inp.value=="That's Used Up!"))
		setStyle(inp,'color','FF0000');
}

function addText(field) {
var inp = document.getElementById(field);
//if(inp.value == '')
	inp.value = ' ';
}

function offerPopup()
  {
    //alert(pageParam)
    //window.open("specialoffer.html","SiteMap","top=280,left=320,scrollbars=no,toolbar=no,width=300,height=350");
    window.open("/main/SpecialOffer.jsp","SiteMap","top=280,left=320,scrollbars=no,toolbar=no,width=300,height=350");
  }
  
function setStyle(obj,style,value){
getRef(obj).style[style]= value;
}
function getRef(obj){
return (typeof obj == "string") ?
	 document.getElementById(obj) : obj;
}
function submitPromoForm(formId)
{
    document.getElementById(formId).submit();
}
function redeem(buttonId)
{
  document.promoCodeForm.actionChoosen.value=buttonId;
  document.promoCode.submit();
}

