// JavaScript Document

function addstyle($field)
{
$field.style.color='#FFCC33';
$field.style.cursor='hand';
$field.style.textDecoration="underline";

}

function removestyle($field)
{
$field.style.color='#dddddd';
$field.style.textDecoration="none";
}
function gotopage($page)
{
win1=open($page, "ppage", "width=750, height=550, menubars=no, scrollbars=yes");
win1.focus();
}

/*function showpage($page, $pid, $sid, $folder,$type)
{
if ($pid!=99)
	{
	document.f1.pageid.value=$pid;
	document.f1.sid.value=$sid;
	}
if ($folder!="" && $sid>0)
	{
	$list=window.location.toString();
	$list1=$list.split("/");
	$list2=$list1[$list1.length-2];
	
	if ($list2!=$folder)
	 	{$page=$folder+"/"+$page; };
	if ($type==1)
		{$page="../"+$page; }
	 
	}
//alert();
document.f1.action = $page;
document.f1.submit();
}



if ($folder!="" && $sid>0)
	{
	$list=window.location.toString();
	$list1=$list.split("/");
	$list2=$list1[$list1.length-2];
	
	if ($list2!=$folder)
	 	{$page=$folder+"/"+$page; };
	if ($type==1)
		{$page="../"+$page; }
	 
	}
//alert();
document.f1.action = $page;
document.f1.submit();
}
*/
function tblheight()
{
alert (screen.height-100);
}

function storebooktype($val1)
{
document.f1.selletter.value=$val1;
document.f1.submit();
}

//--------------------------------------

function addtocart($id, $qty)
{
document.f1.cartlist.value=$id
document.f1.stype.value="addtocart";
document.f1.qty.value=$qty;
document.f1.submit();
}

function removeitem($id)
{
document.f1.cartlist.value=$id
document.f1.stype.value="removeitem";
document.f1.submit();
}

function updateqty($id, $pqty, $tb)
{
$v1=$tb.value
if (isNaN($v1))
   {
    alert("invalid QTY");
    $tb.value=$pqty;
   }
 if ($v1>0)
    {
    addtocart($id, $v1)
    }

}

//----------------------------------------------

function login()
{
win2=open("login.php", "login", "height=600, width=800, menubar=no, addressbar=no, scrollbars=yes,resizable=yes");
win2.focus();

}

function uppercase($field1)
{
$field1.value=$field1.value.toUpperCase();
}