function hide(id) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function show(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
function showhide(id,ind) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(ind).checked){
		  hide(id);
		}else{
		  show(id);
		}
	}
	else {
		if (document.layers) { // Netscape 4
			if (document.ind.checked) {hide(id);}else{show(id);}
		}
		else { // IE 4
			if (document.all.ind.checked) {hide(id);}else{show(id);}
		}
	}
}
function selectpaymentmethod(paymentmethod){
   document.getElementById('page_id').value="order";
   document.getElementById('payment_method_id').value=paymentmethod;
   document.forms('order_form').submit();
}
function selectinvoiceaddress(){
   document.getElementById('page_id').value="order";
   document.forms('order_form').submit();
}


function confirmbasketdelete(basket_product_id){
	if(confirm('Ürünü sepetten çıkarmak istediğinize emin misiniz?') == true) {
	  document.getElementById('basket_product_id').value=basket_product_id;
      document.forms('delete_basket_product_form').submit();
	}
}

function popupCustomer(vid){
   newWindow=window.open(vid,"CustomerChat","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=350,height=450");
        if (newWindow != null && newWindow.opener == null)
                newWindow.opener=window
}
function popupCompany(vid){
   newWindow=window.open(vid,"CompanyChat","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=350,height=450");
        if (newWindow != null && newWindow.opener == null)
                newWindow.opener=window
}
