function activate(product_id, in_id, new_image){
the_product_id = "products_colours" + product_id;
the_in_id = in_id;
x = document.getElementById(the_product_id).getElementsByTagName("img");
for (i=0; i<x.length; i++){
y =(x[i].id);
z = document.getElementById(y);
the_img = document.getElementById("pinfo");
the_img.src = new_image;
//alert (y + " - " + the_in_id);
if (y == the_in_id){
z.style.borderColor = "#000000";
} else {
z.style.borderColor = "#dddddd";
}
}
}
function c_activate(product_id, in_id, new_image){
the_product_id = "pid" + product_id;
the_in_id = in_id;
x = document.getElementById(the_product_id).getElementsByTagName("img");
for (i=0; i<x.length; i++){
y =(x[i].id);
z = document.getElementById(y);
outputimage = "pinfo"+product_id;
the_img = document.getElementById(outputimage);
the_img.src = new_image;
//alert (y + " - " + the_in_id);
if (y == the_in_id){
z.style.borderColor = "#000000";
} else {
z.style.borderColor = "#dddddd";
}
}
}
function pi_activate(product_id, in_id, new_image){
the_product_id = "products_colours" + product_id;
the_in_id = in_id;
x = document.getElementById(the_product_id).getElementsByTagName("img");
for (i=0; i<x.length; i++){
y =(x[i].id);
z = document.getElementById(y);
the_img = document.getElementById("pinfo");
the_img.src = new_image;
//alert (y + " - " + the_in_id);
if (y == the_in_id){
z.style.borderColor = "#000000";
} else {
z.style.borderColor = "#dddddd";
}
}
}
