

function doswap(theItem,nType){
	 if(nType == 1){
	  theItem.src = "images/login_green.jpg"
	 }
	 if(nType == 2){
	  theItem.src = "images/bid_icon.jpg"
	 }
}


function doswap1(theItem,nType){
 if(nType == 1){
  theItem.src = "images/login_green.jpg"
 }
 if(nType == 2){
  theItem.src = "images/bid_gren.jpg"
 }
}


function doLogin(){
 alert("You need to login to bid this product");
}

function doBidding(sUserID,nProductID){
 var rndnum = Math.floor(Math.random()*1001)
 var sURL = 'submit-bid.aspx?sUserID=' + sUserID + '&nProdID=' + nProductID + '&rand=' + rndnum;
 document.getElementById('BidSubmit').src = sURL;
}

function doLoginAlert(){
 alert("Please login to add the product to watch list");
}

function AddtoWatch(nProductID,sUserID){
 var rndnum = Math.floor(Math.random()*1001)
 var sURL = 'add-watch.aspx?sUserID=' + sUserID + '&nProdID=' + nProductID + '&rand=' + rndnum;
 document.getElementById('BidSubmit').src = sURL;
}


function popitup(url) {
  newwindow=window.open(url,"name","height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}


 function doAutoBid(nAuctionID,sUserID){
  var nFrom = document.getElementById("nFromBid").value;
  var nToBid = document.getElementById("nToBid").value;
  var sURL = "auto-bid.asp?sUserID=" + sUserID + "&nAuctionID=" + nAuctionID + "&nFrom=" + nFrom + "&nTo=" + nToBid;
  //alert(sURL);
  document.getElementById('BidSubmit').src = sURL;
 }


function doBiddingandview(sUserID,nProductID){
 //document.location.href = 'submit-bid-and-view.aspx?sUserID=' + sUserID + '&nProdID=' + nProductID;
 sURL = 'submit-bid-and-view.aspx?sUserID=' + sUserID + '&nProdID=' + nProductID;
 document.getElementById('BidSubmit').src = sURL;
}
