	var fr = "pht1";

function displayPic(a, img, width, height) {
	
	if (width != 0)
		a.style.display = "block";
	else
		a.style.display = "none";

	a.width=width;
	a.height=height;
	a.src=img;

}

function changeImg(a, img, width, height, to){

		a.style.display = "none";
	a.src=img;
	a.width=width;
	a.height=height;
		a.style.display = "block";

	document.getElementById(fr).className='phtInAct';
	document.getElementById(to).className='phtAct';
	fr = to;
}

function updatediv(name, minHeight, changeTo) {

	if (document.getElementById(name).scrollHeight > minHeight) {
		document.getElementById(name).setAttribute('class',changeTo) ;
		document.getElementById(name).setAttribute('className',changeTo) ;
	}
}


function checkBeforeCascet(f) {
	var e = f.elements;

	if (e.qty) if (e.qty.value == '') {alert('Please select a quantity you want to order!'); return false;} 
	if (e.itemCodes) if (e.itemCodes.value == '') {alert('Please select which item on the picture you want to choose!'); return false;} 
	if (e.color) if (e.color.value == '') {alert('Please select a color!'); return false;} 
	if (e.size) if (e.size.value == '') {alert('Please select a size!'); return false;} 
	if (e.fabric) if (e.fabric.value == '') {alert('Please select a fabric!'); return false;} 
	if (e.selprice) if (e.selprice.value == '') {alert('Please select an item!'); return false;} 

f.submit();
return true;
}

function checkMusicBeforeCascet(f) {
	var e = f.elements;

	if (e.qty.value == '') {alert('Please select a quantity you want to order!'); return false;} 

f.submit();
return true;
}


function mail3(f) {	
	var notFilled = "you have missed some *required fields";
	var e = f.elements;

	if (e.name.value == '') {alert(notFilled); return false;} 
	if (e.email.value == '@') {alert(notFilled); return false;} 
	if (e.country.value == '') {alert(notFilled); return false;} 
	if (e.city.value == '') {alert(notFilled); return false;} 
	if (e.question.value == '') {alert(notFilled); return false;} 

return true;
}

function mail5(f) {	
	var notFilled = "you have missed some *required fields";
	var e = f.elements;

	if (e.name.value == '') {alert(notFilled); return false;} 
	if (e.country.value == '') {alert(notFilled); return false;} 
	if (e.city.value == '') {alert(notFilled); return false;} 
	if (e.email.value == '@') {alert(notFilled); return false;} 
	if (e.subject.value == '') {alert(notFilled); return false;} 
	if (e.message.value == '') {alert(notFilled); return false;} 

return true;
}

function mail6(f) {	
	var notFilled = "you have missed some *required fields";
	var e = f.elements;

	if (e.name.value == '') {alert(notFilled); return false;} 
	if (e.country.value == '') {alert(notFilled); return false;} 
	if (e.city.value == '') {alert(notFilled); return false;} 
	if (e.email.value == '@') {alert(notFilled); return false;} 

return true;
}

function mail8(f) {	
	var notFilled = "you have missed some *required fields";
	var e = f.elements;

	if (e.name.value == '') {alert(notFilled); return false;} 
	if (e.typeOfBusiness.value == '') {alert(notFilled); return false;} 
	if (e.contactName.value == '') {alert(notFilled); return false;} 
	if (e.country.value == '') {alert(notFilled); return false;} 
	if (e.city.value == '') {alert(notFilled); return false;} 
	if (e.address.value == '') {alert(notFilled); return false;} 
	if (e.postalCode.value == '') {alert(notFilled); return false;} 
	if (e.email.value == '@') {alert(notFilled); return false;} 
	if (e.message.value == '') {alert(notFilled); return false;} 

return true;
}

function mailCasket(f) {	
	var notFilled = "you have missed some *required fields";
	var e = f.elements;

	if (e.name.value == '') {alert(notFilled); return false;} 
	if (e.surname.value == '') {alert(notFilled); return false;} 
	if (e.country.value == '') {alert(notFilled); return false;} 
	if (e.city.value == '') {alert(notFilled); return false;} 
	if (e.address.value == '') {alert(notFilled); return false;} 
	if (e.postalCode.value == '') {alert(notFilled); return false;} 
	if (e.phone.value == '') {alert(notFilled); return false;} 
	if (e.email.value == '@') {alert(notFilled); return false;} 

return true;
}

function chguestbook(f) {	
	var notFilled = "you have missed some *required fields";
	var e = f.elements;

	if (e.name.value == '') {alert(notFilled); return false;} 
	if (e.message.value == '') {alert(notFilled); return false;} 
	if (e.captcha.value == '') {alert(notFilled); return false;} 

return true;
}


function convertCurr(oform) {
	var e = oform.elements;
		var cfr = e.cfr.value;
		var ccr = e.ccr.value;

		e.cto.value = Math.round(cfr*ccr * 100) / 100;

}

/*
function disabletext(e){
return false
}

function reEnable(){
return true
}

document.onselectstart=new Function ("return false")

if (window.sidebar){
	document.onmousedown=disabletext
	document.onclick=reEnable
}

*/

