/* $Revision: 1.2.2.2 $ */
var path_nav_images = "/WebRoot/pschraderdb/Shops/ps-shop/images/rollover/";


function rollover(id, status) {
	if(document.getElementById) {
		document.getElementById(id).src = path_nav_images + id + "_" + status + ".gif";
	}
}

function rollover_nr(id, status, nr) {
	if(document.getElementById) {
		document.getElementById(id + "_" + nr).src = path_nav_images + id + "_" + status + ".gif";
	}
}


function openWindowPraem(url, width, height) {
  fenster = open(url, "PS_POPUP", "width=" + width + ",height=" + height + ",scrollBars=1,resizable=0");
	setTimeout('fenster.focus()', 200);
	}


function DoVal()
{
  var frm = document.forms["frm1"].Quantity.value;
    //alert(frm);
    window.location.href="?ChangeObjectID=#ID&amp;ChangeAction=AddToBasket&amp;LastViewObjectID=#ViewObjectID&amp;Quantity=" + frm;
    submit();
}
function DoVal2()
{
  var frm = document.forms["frm1"].Quantity.value;
  window.location.href="?ObjectID=#Session.User.ID&amp;ViewAction=ViewUserShoppingLists&amp;ProductID=#ID&amp;Quantity=" + frm;
    submit();
}

function toggle_nav()
{  
  if( document.getElementById("snav").style.display == "none" || document.getElementById("snav").style.display == '')
  {
    document.getElementById("snav").style.display = "block";
    document.getElementById("hlservice").src = "/WebRoot/pschraderdb/Shops/ps-shop/images/headlines/service_1.gif";
    
  } else {
    document.getElementById("snav").style.display = "none";
    document.getElementById("hlservice").src = "/WebRoot/pschraderdb/Shops/ps-shop/images/headlines/service_0.gif";
  }
}

function CharCount(str, out) {
  var max = 140;
  var input = document.getElementById(str);
  var output = document.getElementById(out);  
  if (input.value.length > max) {
    input.value = input.value.substring(0, max);
  } else {
    output.value = max - input.value.length;
  }     
}
