

function togglediv(elementid){
	if (document.getElementById(elementid).style.display == 'block'){
		document.getElementById(elementid).style.display = 'none';
	} 
	else {
		document.getElementById(elementid).style.display = 'block';
	}
} 

var main_image_src;
var is_view_larger;
function view_larger_popup(url) {
	main_image_src = js_larger_image_array[0];	
	is_view_larger = "true";
	popup_window(url, 675, "Large");
}

function view_color_popup(url) {
	main_image_src = js_color_image_array[0];
	is_view_larger = "false";
	popup_window(url, 675, "Colors");
}

function view_default_popup(url) {
	main_image_src = js_default_image_array[0];
	popup_window(url, 550, "Default");
}


function popup_window(url, height, winName) {
	
	
	var width=732;
	var from_top=200;
	var from_left=200;
	var toolbar='no';
	var location='no';
	var directories='no';
	var status='no';
	var menubar='no';
	var scrollbars='no';
	var resizable='no';
	var atts='width='+width+',height='+height+',top='+from_top+',screenY=';
	atts+= from_top+',left='+from_left+',screenX='+from_left+',toolbar='+toolbar;
	atts+=',location='+location+',directories='+directories+',status='+status;
	atts+=',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable;
	
	window.open(url, winName ,atts);
}
