active_pict = 0;
function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = ";expires="+date.toGMTString();
}
else var expires = "";
var cookie = name+"="+value+expires+";path=/";
document.cookie = cookie;
}
function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i<ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0)
{
//alert(name+': '+c.substring(nameEQ.length,c.length));
return c.substring(nameEQ.length,c.length);
}
}
return false;
}
function trailer_open(url, width, height)
{
var left = (screen.width/2)-(width/2);
var top = (screen.height/2)-(height/2);
window.open(url,"","height="+height+",width="+width+",status = no,toolbar = no,menubar = no,location = no,resizable = no,titlebar = no,scrollbars = no,fullscreen = no,top ="+top+",left ="+left);
}
function eraseCookie(name)
{
createCookie(name,"",-1);
}
var myrules = {
'div.imageswitcht a' : function(el)
{
var id = el.id.split('_');
if(el.className == 'active first')
active_pict = id[1];
else
Element.hide('product_img_'+id[1]);
el.onclick = function()
{
var id = el.id.split('_');
var pict_id = id[1];
if(active_pict != pict_id)
{
$('product_img_'+pict_id).style.visibility = 'visible';
Element.hide('product_img_'+pict_id);
new Effect.Fade('product_img_'+active_pict, {
afterFinish: function()
{
new Effect.Appear('product_img_'+pict_id, { duration: 0.5 });
},
duration: 0.5
});
$('pict_'+active_pict).className = $('pict_'+active_pict).className.replace(/active/, '');
$('pict_'+pict_id).className += ' active';
active_pict = pict_id;
}
return false;
}
},
'#imageversion' : function(el)
{
$(el).show();
},
'#film_content' : function(el)
{
var so = new SWFObject("/themes/eoft/eoftplayer.swf", "trailer", "320", "512", "8", "#E1E1E1");
so.addVariable("lang", el.className);
so.addVariable("autoplay", 0);
so.addVariable("playonpulldown", 1);
so.addVariable("pulldownopen", 1);
if(Element.hasClassName(el, "en"))
so.addVariable("mov", 146);
else
so.addVariable("mov", 164); //so.addVariable("mov", 136);
so.write(el);
}
};
if( typeof Behaviour != "undefined")
Behaviour.register(myrules);
// function to change price when option is changed
function price_change(id)
{
var i = 0;
while($('price_'+i))
{
$('price_'+i).style.display="none";
i++;
}
$('price_'+id).style.display="block";
}