﻿// (c) 2007-08 for this script by joha | http://www.x75.net


function sendEvent(typ,prm) { thisMovie("playerID").sendEvent(typ,prm); };

function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};
function makeflashPlayer(objID, file) {
    var so = new SWFObject("../../../c/x/mediaplayer.swf","playerID","200","100","8");
    so.addParam("allowfullscreen","true");    
    so.addParam("allowscriptaccess","always");
    
    so.addVariable("file",file);
    so.addVariable("shuffle","false");
    so.addVariable("linktarget","_self");
    
    
	so.addVariable("enablejs","true");
	so.addVariable("javascriptid","playerID");
    
    so.addVariable("height","100");
    so.addVariable("width","200");
    so.addVariable("displaywidth","0");
    so.addVariable("showicons","false");
    so.addVariable("showdigits","false");
    so.addVariable("thumbsinplaylist","false");

    so.write(objID);
}

function AddToCart(ID) {
	var amount;
	if (document.getElementById(ID) != null) {
		amount = document.getElementById(ID).value;
	} else {
		amount = 1;
	}
	if (amount > 0) {
		window.location.href = urlToCart + '&a=addItem&prdID=' + ID + '&amount=' + amount;
	}			
}

function UpdateCartItem(ID) {
	var amount;
	if (document.getElementById(ID) != null) {
		amount = document.getElementById(ID).value;
	} else {
		amount = 1;
	}
	if (amount > 0) {
		window.location.href = urlToCart + '&a=updateItem&prdID=' + ID + '&amount=' + amount;
	} else {
		window.location.href = urlToCart + '&a=removeItem&prdID=' + ID;	
	}			
}