/*	window.addEvent('domready', function(e){
	
		var drop = $('shopcart');
		var dropFx = drop.effect('background-color', {wait: false, duration: 1}); // wait is needed so that to toggle the effect,
 		var id;
		$$('.img').each(function(item){

			item.addEvent('mousedown', function(e) {
				e = new Event(e).stop();
		 
				var clone = this.clone()
					.setStyles(this.getCoordinates()) // this returns an object with left/top/bottom/right, so its perfect
					.setStyles({'opacity': 0.7, 'position': 'absolute', 'z-index': '99999'})
					.addEvent('emptydrop', function() {
						this.remove();
						drop.removeEvents();
					}).inject(document.body);
		 
				drop.addEvents({
					'drop': function() {
						drop.removeEvents();
						clone.remove();
						dropFx.start('ffffff');
						
						id = item.id.replace(/p/,"");
						new Ajax('/webwinkels/123apotheek/cart_content.php', {
							method: 'post',
							data: {
								product_id: id,
								aantal: '1'
							},
							update: $('shopcart')
						}).request();

					
						
					},
					'over': function() {
						dropFx.start('98B5C1');
					},
					'leave': function() {
						dropFx.start('ffffff');
					}
				});
		 
				var drag = clone.makeDraggable({
					droppables: [drop]
				}); // this returns the dragged element
		 
				drag.start(e); // start the event manual
			});
		 
		});	
	});
*/
	var AutoPrint = true; // Indien 'false' wordt de pagina niet automatisch uitgeprint
	
	function PrintPageDiv(divName){
	if (document.getElementById != null){
	var html = '<HTML>\n<HEAD>\n';
	if (document.getElementsByTagName != null){
	var headTags = document.getElementsByTagName("head");
	if (headTags.length > 0)
	html += headTags[0].innerHTML;}
	html += '\n</HE' + 'AD>\n<BODY>\n';
	var PrintKlaarElem = document.getElementById(divName);
	if (PrintKlaarElem != null){
	html += PrintKlaarElem.innerHTML;}
	html += '\n</BO' + 'DY>\n</HT' + 'ML>';
	var printWin = window.open("","PrintPagina");
	printWin.document.open();
	printWin.document.write(html);
	printWin.document.close();
	if (AutoPrint)printWin.print();}}

	function AddCart(id)
	{ 
		var pos = $('shopcart').getCoordinates();
		var prod = $('p'+id);
		var aantal = 1;
		var formaat = '';
		var var1 = '';
		var var2 = '';
		var var3 = '';
		var var4 = '';
		var var5 = '';
		
		if(document.getElementById('aantal'))
		{
			aantal = document.getElementById('aantal').value;
		}
		else
		{
			aantal = 1
		}
		
		if(document.getElementById('formaat'))
		{
			formaat = document.getElementById('formaat').value;
		}
		
		if(document.getElementById('var1'))
		{
			var1 = document.getElementById('var1').value;	
		}
		if(document.getElementById('var2'))
		{
			var2 = document.getElementById('var2').value;	
		}
		if(document.getElementById('var3'))
		{
			var3 = document.getElementById('var3').value;	
		}
		if(document.getElementById('var4'))
		{
			var4 = document.getElementById('var4').value;	
		}
		if(document.getElementById('var5'))
		{
			var5 = document.getElementById('var5').value;	
		}
		
		var clone = prod.clone()
				.setStyles({position: 'absolute', 'z-index': 1})	
				.setStyles(prod.getCoordinates())
				.injectInside(document.body);
		var fx = new Fx.Styles(clone, {duration: 500});
		var top = pos.top - 50;
		var left = pos.left + 23;
		
		fx.start({
			top: top, 
			left: left, 
			width: 100, 
			height: 100,
			opacity: 0
		}).chain(function(){
			new Ajax('/cart_content.php', {
				method: 'post',
				update: $('shopcart'),
				data: {
					product_id: id,
					aantal: aantal,
					formaat: formaat,
					var1: var1,
					var2: var2,
					var3: var3,
					var4: var4,
					var5: var5
				}//,
				//onComplete: function(){
				//	window.location='http://www.droomlinnen.nl/winkelwagen/index.html';			
				//}
				
			}).request();
			
		})
	
	}
	function hide(id)
    {
        var elem = document.getElementById(id);
        if(elem.style.display == 'none')
		{
			elem.style.display = '';
		}
		else{
			elem.style.display = 'none';
		}
    }
    function show(id)
    {    
        var elem = document.getElementById(id);
        elem.style.display = '';
    }
	
	function showBlock(e){
		$(e).style.display = 'block';
	}
	function hideBlock(e){
		$(e).style.display = 'none';
	}
	
function removeDots(string) {
	var tstring = "";
	string = '' + string;
	splitstring = string.split(".");
	for(i = 0; i < splitstring.length; i++)
	tstring += splitstring[i];
	return tstring;
}

function setup() {

article_id = document.getElementById('q1').value;

document.getElementById('total').value = article_id;
document.getElementById('prijsdisplay').innerHTML =  '&#8364; ' + article_id;



var list = document.getElementById('q1');
article_id2 = list.options[list.selectedIndex].id; 

document.getElementById('formaat').value = article_id2;
}



function bookmarksite(title, url, object)
{
    if ( document.all )
    {
        window.external.AddFavorite(url, title);
        return false;
    }
    else if ( window.sidebar )
    {
        window.sidebar.addPanel(title, url, "");
        return false;
    }
    else if( window.opera && window.print )
    {
        object.rel = 'sidebar';
        object.href = url;
        object.title = title;
        return true;
    }
    else
    {
        window.alert('Helaas, deze link werkt alleen in Firefox, Opera en Internet Explorer.');
        return false;
    }
}
function createLink(title, url, text)
{
    document.write('<a class="copyrights" href="javascript:;" onclick="javascript:return bookmarksite(\''+title+'\', \''+url+'\', this)" class="bookmarklink">'+text+'</a>');
}
<!--
/*
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
//alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
//alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
*/
