// JavaScript Document

function disp(id,bname,aname,prze,des,e,fle)
{
    
    var str="<table width=95% align=center><tr><td><img src='products/" + fle + "' width=300 height=300></td></tr>";
    
	/*str+="<table width=150px><tr><td colspan=3 class=cy2 style='border-bottom:1 solid black' align=center>Product Details</td></tr>";
    str+="<tr><td class=cy2 align=left>Id</td><td>:</td><td class=cy align=left>" + id + "</td></tr>";
    str+="<tr><td class=cy2 align=left>Book Name<td>:</td></td><td class=cy align=left>" + bname + "</td></tr>";
    str+="<tr><td class=cy2 align=left>Author Name<td>:</td></td><td class=cy align=left>" + aname + "</td></tr>";
    str+="<tr><td class=cy2 align=left>Price(Rs.)<td>:</td></td><td class=cy align=left>" + Math.round(prze)+ "</td></tr>";
	str+="</table>";
	str+="<tr><td class=cy2 align=left valign=top><u>Discription</u></td><td class=cy align=left>" + des + "</td></tr>";*/
    str+="<tr><td ><table width='100%'><tr><td><a href='Buy.asp?bid=" + id + "'><img class=point border=0 src=images/b02.gif></a></td><td align=right><img class=point onclick=Hide() src=images/Close.gif></td></tr></table></td></tr></table>";
    document.getElementById("divDetail").style.display='inline';
    document.getElementById("dispPane").innerHTML=str;

        
    document.getElementById("divDetail").style.top=(document.documentElement.scrollTop+310)+"px";
    document.getElementById("divDetail").style.left=(document.documentElement.scrollLeft+320)+"px";
    
//    document.getElementById("title").innerText=tit;
}

function Hide()
{
	document.getElementById("divDetail").style.display='none';
}


function DLoad(fle)
{
	location.href="filedownload.asp?filename="+fle+".pdf";
}



function validation()
{
	var e=document.regForm;
	alert("DD");
	if(e.txtName.value=="")
	{
		alert("Name must not be empty . . . ");
		e.txtName.focus();
		return false;
	}
	if(e.lstGender.value=="sl")
	{
		alert("Select any Gender . . . ");
		e.lstGender.focus();
		return false;
	}
	if(e.txtAddress.value=="")
	{
		alert("Address must not be empty . . . ");
		e.txtAddress.focus();
		return false;
	}
	if(e.txtPhone.value=="")
	{
		alert("Contact Number must not be empty . . . ");
		e.txtPhone.focus();
		return false;
	}
	
	if(e.txteMail.value=="")
	{
		alert("e-Mail must not be empty . . . ");
		e.txteMail.focus();
		return false;
	}
	else
	{
		var em=e.txteMail.value;
		if((em.indexOf('@',0)==-1)||(em.indexOf('.',0)== -1))
		{ 
			alert("PLEASE ENTER VALID E-MAIL!");
			e.txteMail.focus();
			e.txteMail.select();
			return false;
		}
	}
	
	if(e.txtPWord.value=="" || e.txtConfirm.value=="")
	{
		alert("Password must not be Null . . . ?");
		e.txtPWord.focus();
		return false;
	}
	
	if(e.txtPWord.value!=e.txtConfirm.value)
	{
		alert("Password must not be Same . . . ?");
		e.txtPWord.focus();
		return false;
	}
}

