// Menu rollovers
function menuitemover ($identifier) {
	document.getElementById($identifier).style.color='#a0c0d3';
}
function menuitemout ($identifier) {
	document.getElementById($identifier).style.color='#000000';
}


// Product rollovers in gallery
function productover ($identifier) {
	document.getElementById($identifier).src='..\/g\/g_corner_gallery_hot.gif)';
}
function productout ($identifier) {
	document.getElementById($identifier).src='..\/g\/g_corner_gallery_cold.gif)';
}


// Page Next & Prev rollovers
function pageshuffleover ($identifier) {
	document.getElementById('pagebtn'+$identifier).style.background='url(..\/g\/bg_page_'+$identifier+'_hot.gif)';
}
function pageshuffleout ($identifier) {
	document.getElementById('pagebtn'+$identifier).style.background='url(..\/g\/bg_page_'+$identifier+'_cold.gif)';
}


// Page Numbers rollovers
function pagebtnover ($identifier) {
	document.getElementById($identifier).style.background='url(..\/g\/bg_page_btn_hot.gif)';
	document.getElementById($identifier).style.color='#000000';
}
function pagebtnout ($identifier) {
	document.getElementById($identifier).style.background='url(..\/g\/bg_page_btn_cold.gif)';
	document.getElementById($identifier).style.color='#7a93a1';
}


// Remove spec
function removespec ($identifier) {
	document.getElementById('specs').removeChild(document.getElementById($identifier));
}


// Add spec
function addspec () {
	var num = (document.getElementById('numspecs').value -1)+ 2;
	var numspecs = document.getElementById('numspecs').value=num;
	var specid = 'spec'+num;
	var newspec = document.createElement('div');
	newspec.setAttribute('id',specid);
	newspec.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" style="width:370px; margin-top:6px;"><tr><td class="adminspecname"><div style="margin:0 0 0 12px;"><input type="text" name="specnames[]" value="" class="label" /></div></td><td style="text-align:right; vertical-align:top;"><img src="../g/btn_small_delete2.gif" border="0" style="cursor:pointer;" onclick="removespec(\'spec'+num+'\')" /></td></tr><tr><td class="adminspecvalue" colspan="2"><div style="margin:0 0 8px 22px;"><textarea name="specvalues[]" class="label"></textarea></div></td></tr></table>';
	document.getElementById('specs').appendChild(newspec);
}


// Remove partgroup
function removepartgroup ($identifier) {
	document.getElementById('partgroups').removeChild(document.getElementById($identifier));
}


// Add partgroup
function addpartgroup () {
	var num = (document.getElementById('numpartgroups').value -1)+ 2;
	var numpartgroups = document.getElementById('numpartgroups').value=num;
	var partgroupid = 'partgroup'+num;
	var newpartgroup = document.createElement('div');
	newpartgroup.setAttribute('id',partgroupid);
	newpartgroup.innerHTML = '<input type="hidden" id="numparts'+num+'" name="numparts'+num+'" value="1" /><input type="hidden" name="partgroupjavanums[]" value="'+num+'" /><table cellpadding="0" cellspacing="0" border="0" style="width:370px; margin-top:6px;"><tr><td class="adminspecname" style="width:298px;"><div style="margin:0 0 0 12px;"><input type="text" name="partgroups[]" value="" class="label" style="width:271px;" /></div></td><td style="text-align:left; vertical-align:middle;"><img src="../g/btn_small_delete2.gif" border="0" style="cursor:pointer;" onclick="removepartgroup(\'partgroup'+num+'\')" /></td></tr><tr><td class="adminspecvalue" colspan="2" id="parts'+num+'"><div style="margin:0 0 1px 22px; clear:both;" id="part'+num+'-1"><table cellpadding="0" cellspacing="0" border="0"><tr><td><input type="text" name="parts'+num+'[]" value="" class="label2"></td><td style="vertical-align:middle;"><img src="../g/btn_small_delete2.gif" style="cursor:pointer; padding-left:11px; border:none;" onclick="removepart(\'part'+num+'-1\',\''+num+'\')" /></td></tr></table></div></td></tr><tr><td class="adminspecvalue" colspan="2"><div style="margin:0 0 2px 22px;"><img src="../g/btn_small_add_row.gif" border="0" style="cursor:pointer;" onclick="addpart(\''+num+'\')" /></div></td></tr></table>';
	document.getElementById('partgroups').appendChild(newpartgroup);
}


// Remove part
function removepart ($identifier,$identifier2) {
	document.getElementById('parts'+$identifier2).removeChild(document.getElementById($identifier));
}


// Add part
function addpart ($identifier) {
	var num = (document.getElementById('numparts'+$identifier).value -1)+ 2;
	var numparts = document.getElementById('numparts'+$identifier).value=num;
	var partid = 'part'+$identifier+'-'+num;
	var newpart = document.createElement('div');
	newpart.setAttribute('id',partid);
	newpart.innerHTML = '<div style="margin:0 0 1px 22px; clear:both;" id="part'+num+'"><table cellpadding="0" cellspacing="0" border="0"><tr><td><input type="text" name="parts'+$identifier+'[]" value="" class="label2"></td><td style="vertical-align:middle;"><img src="../g/btn_small_delete2.gif" style="cursor:pointer; padding-left:11px; border:none;" onclick="removepart(\'part'+$identifier+'-'+num+'\',\''+$identifier+'\')" /></td></tr></table></div>';
	document.getElementById('parts'+$identifier).appendChild(newpart);
}


// Click Checkbox Active/Inactive
function makeactive ($inputid,$imgid) {
	if (document.getElementById($inputid).value==1) {
		document.getElementById($inputid).value=0;
		document.getElementById($imgid).src='../g/btn_small_active_cold.gif';
	} else if (document.getElementById($inputid).value==0) {
		document.getElementById($inputid).value=1;
		document.getElementById($imgid).src='../g/btn_small_active_hot.gif';
	}
}


// Album
var previews = new Array;
function lbox ($identifier) {
	if (previews[0]) {
		Slimbox.open(previews, ($identifier-1));
	}
}
function album ($identifier, $imgidentifier) {
	document.getElementById('preview').src='images/previews/'+$imgidentifier+'.jpg';
	document.getElementById('preview').onclick=function () {
		Slimbox.open(previews, ($identifier-1));
	}
}


function opencontact3(curruri) {
	jQuery('#contactclosed').hide();
	jQuery('#contactopen').show();
}
function closecontact3(curruri) {
	jQuery('#contactclosed').show();
	jQuery('#contactopen').hide();
}



