cork_empty=new Image;
cork_empty.src="images/cork-empty.png";
cork_full = new Image;
cork_full.src = "images/cork-full.png";
cork_over = new Image;
cork_over.src = "images/cork-over.png";
cork_trans = new Image;
cork_trans.src = "images/blank.gif";
cork_white = new Image;
cork_white.src = "images/cork-white.png";


function confirmSubmit(text)
{
	var agree=confirm(text);
	if (agree)
		return true ;
	else
		return false ;
}



function changeVisibility(id, focusid) {
	if( document.getElementById(id).style.display=='none' )
		{
			document.getElementById(id).style.display = '';
	}else{
		document.getElementById(id).style.display = 'none';
	}
}

function showHide(elementId, whichId){
	var which;
	var element;

	if (document.getElementById) 
		which = document.getElementById(whichId); 
	else if (document.all) 
		which = document.all[whichId]; 
	else if (document.layers) 
		which = document.layers[whichId];

	if (document.getElementById) 
        element = document.getElementById(elementId); 
    else if (document.all) 
        element = document.all[elementId]; 
    else if (document.layers) 
        element = document.layers[elementId];

	if (element && element.style) {
		if(which.checked==true)
			element.style.display = (element.style.display != 'inline')? 'inline' : 'none';
		else
			element.style.display = (element.style.display != 'none')? 'none' : 'inline';
	}
}

function showHideSelect(elementId, whichValue, focusId){
	var element;
	var focus;

	if (document.getElementById) 
        element = document.getElementById(elementId); 
    else if (document.all) 
        element = document.all[elementId]; 
    else if (document.layers) 
        element = document.layers[elementId];

	if (document.getElementById) 
        focus = document.getElementById(focusId); 
    else if (document.all) 
        focus = document.all[focusId]; 
    else if (document.layers) 
        focus = document.layers[focusId];

	if (element && element.style) {
		if(whichValue) {
			element.style.display = (element.style.display != 'inline')? 'inline' : 'none';
			focus.focus();
		}
		else
			element.style.display = (element.style.display != 'none')? 'none' : 'inline';
	}
} 


function hideElement (elementId) {
	var element;

	if (document.getElementById) 
        element = document.getElementById(elementId); 
    else if (document.all) 
        element = document.all[elementId]; 
    else if (document.layers) 
        element = document.layers[elementId];

	if (element && element.style)
		element.style.display = 'none';
}

function showElement (elementId) {
	var element;

	if (document.getElementById) 
        element = document.getElementById(elementId); 
    else if (document.all) 
        element = document.all[elementId]; 
    else if (document.layers) 
        element = document.layers[elementId];

	if (element && element.style)
		element.style.display = '';
}

