// <![CDATA[
function accesskeys(){ if (document.getElementsByTagName){ var anchors = document.getElementsByTagName("a"); for (var i=0; i 0) {
offset = document.cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
cookieValue = unescape(document.cookie.substring(offset, end))
}
}
return cookieValue;
}
function writeItems(name, value, hours){
var expire = "";
if(hours != null) {
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = "; expires=" + expire.toGMTString();
}
document.cookie = name + "=" + escape(value) + expire;
}
function leftTrim(sString){
while (sString.substring(0,1) == ' '){
sString = sString.substring(1, sString.length);
}
return sString;
}
function rightTrim(sString){
while (sString.substring(sString.length-1, sString.length) == ' '){
sString = sString.substring(0,sString.length-1);
}
return sString;
}
function trimAll(sString){
while (sString.substring(0,1) == ' '){
sString = sString.substring(1, sString.length);
}
while (sString.substring(sString.length-1, sString.length) == ' '){
sString = sString.substring(0,sString.length-1);
}
return sString;
}
function print_page() {
window.print();
}
var tipTimer;
function locateObject(n, d) { //v3.0
var p,i,x;
if (!d) d=document;
if ((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
}
if (!(x=d[n])&&d.all) x=d.all[n];
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=locateObject(n,d.layers[i].document); return x; } function hideTooltip(object) { if (document.all) { locateObject(object).style.visibility="hidden" locateObject(object).style.left = 1; locateObject(object).style.top = 1; return false } else if (document.layers) { locateObject(object).visibility="hide" locateObject(object).left = 1; locateObject(object).top = 1; return false } else return true } function showTooltip(object,e, tipContent, backcolor, bordercolor, textcolor, displaytime){ window.clearTimeout(tipTimer) if (document.all) { locateObject(object).style.top=document.body.scrollTop+event.clientY+20 locateObject(object).innerHTML='
'
if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft)){
locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth-10;
} else {
locateObject(object).style.left=document.body.scrollLeft+event.clientX
}
locateObject(object).style.visibility="visible"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
return true;
} else if (document.layers) {
locateObject(object).document.write('
')
locateObject(object).document.close()
locateObject(object).top=e.y+20
if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth)) {
locateObject(object).left = window.innerWidth - locateObject(object).clip.width-10;
} else {
locateObject(object).left=e.x;
}
locateObject(object).visibility="show"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
return true;
} else {
return true;
}
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_showHideLayers() { //v6.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i// // // -1) arr.delElement(pos);
var value = arr.join(';');
writeItems("items", value, 48);
location.href="//solen.ca/pub/index.php?catalogue=description&id=7813&recherche=&numRows=&niveau1=1&niveau2=1&niveau3=130&manufacturiers=&s1=2&s2=1&s3=2&s4=";
}
function setItems(id){
var v = readItems("items") ;
var arr = v.split(";");
if (!arr.partOfArrayElements(id)) {
if ((v.length>0)&&(v.substr(v.length-1,1)!=";")) v+=";"; // ajouter le ; s'il n'est pas présent à la fin
var value = v + id + ",1" ;
writeItems("items", value, 48);
location.href="//solen.ca/pub/index.php?catalogue=description&id=7813&recherche=&numRows=&niveau1=1&niveau2=1&niveau3=130&manufacturiers=&s1=2&s2=1&s3=2&s4=";
}
}
function addQuantity(fld){
var id = fld.id;
var qt = fld.value;
var it = id+","+qt;
var coockie_val = "";
var v = readItems("items") ;
var arr = v.split(";");
if (arr.partOfArrayElements(id)) {
var pos = arr.getElementPos(id);
var value = id + "," + qt;
arr.splice(pos, 1, value);
for (var i=0;i0) coockie_val += arr[i] + ";";
}
writeItems("items", coockie_val, 48);
location.href="//solen.ca/pub/index.php?catalogue=description&id=7813&recherche=&numRows=&niveau1=1&niveau2=1&niveau3=130&manufacturiers=&s1=2&s2=1&s3=2&s4=";
}
}
function showBasket(){
var v = readItems("items") ;
if (!v) {
alert("Your shopping cart is actually empty.")
} else
location.href="//solen.ca/pub/index.php?catalogue=cart&id=7813&recherche=&numRows=&niveau1=1&niveau2=1&niveau3=130&manufacturiers=&s1=2&s2=1&s3=2&s4=";
}
// ]]>// //