var datenum='1234567890/'

function popup(mylink, windowname)
{
var href , content;
href ="http://www.healthmegamall.com/ProdImages/"+mylink;
content ="<html><body>" ;
content = content + "<img src='"+href+"'  width=400 height=400>";
content = content +"</body></html>";

mywindow=window.open('about:blank',null
, 'left=200, top=200,width=400,height=400');
mywindow.document.write(content);
mywindow.document.close();

return false;
}
 
function showtext(ldescription,idproduct)
{

  var msg = document.getElementById(idproduct);
    msg.innerHTML = ldescription;
    msg.style.visibility = "visible";


}

function hidetext(idproduct)
{
var msg = document.getElementById(idproduct);
    
	msg.style.visibilty="hidden";
	msg.style.display="none";

}


function onLink(id, a, b, c, d) 
{
	document.getElementById(c).style.textDecoration='underline';
	document.getElementById(b).style.textDecoration='underline';
	document.getElementById(a).style.border='1px solid #CCCCCC';
	document.getElementById(d).style.textDecoration='underline';
//	document.getElementById(e).style.border='1px solid #CCCCCC';

//	document.getElementById(c).style.color='#CCCCCC';
//	document.getElementById(b).style.color='#CCCCCC';
//	document.getElementById(d).style.color='#CCCCCC';
}
function offLink(id, a, b, c, d) 
{
	document.getElementById(c).style.textDecoration='none';
	document.getElementById(b).style.textDecoration='none';
	document.getElementById(a).style.border='1px solid #FFFFFF';      
	document.getElementById(d).style.textDecoration='none';
//	document.getElementById(e).style.border='1px solid #FFFFFF';
}   


function emptyEmailField(obj, str)
{
	var stringemailvalue;
	
	stringemailvalue = document.getElementById(obj.id).value;

	if (stringemailvalue == str)
	{
		obj.value = "";
		obj.style.color = "#000000";
	}
}

function fillEmailField(obj, str)
{
	if (document.getElementById(obj.id).value == "")
	{
		obj.value = str;
		obj.style.color = "#9A9A9A";
	}
}

function imgHoverover(aobj, imgobj)
{
	document.getElementById(imgobj).style.border='1px solid #B7B7B7';
}

function imgHoverout(aobj, imgobj)
{
	document.getElementById(imgobj).style.border='none';
}

function imgFeatHoverover(aobj, imgobj)
{
	document.getElementById(imgobj).style.border='1px solid #B7B7B7';
}

function imgFeatHoverout(aobj, imgobj)
{
	document.getElementById(imgobj).style.border='none';
}


function onRelatedLink(obj, relImg)
{
	document.getElementById(relImg).style.border='1px solid #cccccc';
}

function offRelatedLink(obj, relImg)
{
	document.getElementById(relImg).style.border='1px solid #ededed';
}

function addCCardSpace(frmText)
{
    frmText.value = frmText.value.replace(/([^ ]{4})(?=[^ ])/g, "$1 ");
}

function AllowOnlyChar(e,allow) {
    var nChar;

    nChar=document.all?parseInt(e.keyCode): parseInt(e.which);
    return (allow.indexOf(String.fromCharCode(nChar))!=-1);
}

function enableMOText(frmText) {
    frmText.disabled = false;
    frmText.focus();
}

function disableMOText(frmText) {
    frmText.value = "";
    frmText.disabled = true;
}

function refreshParent() {
    window.opener.location.href = window.opener.location.href;

    if (window.opener.progressWindow){
        window.opener.progressWindow.close()
    }
    window.close();
}

