function loadBackground(){
	if (screen.width > 1150){
		document.body.style.backgroundImage = 'url(/images/eagle.gif)';
		document.body.style.backgroundRepeat = 'no-repeat';				
		document.body.style.backgroundPosition = '50px 30px';
	}
}


function getCenter(w, h){

	var scrleft = (screen.width - w)/2;
 	var scrtop = (screen.height - h)/2;

	return ('left=' + scrleft + ', top=' + scrtop)

}

function addMail(f){

	if (f.txtEMail.value.length < 8)
		return false;

	window.open('', 'addWin', 'toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, copyhistory=0, width=400, height=160, ' + getCenter(400, 160));

  f.action = "/addMail.asp";
	f.target = "addWin";
	f.submit();
	
}

function openHBOProduct(id){
	window.open('popup_products.asp?ID=' + id, 'productWin', 'toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, copyhistory=0, width=600, height=600, ' + getCenter(600, 600));
}

function openCCMessage(){
	window.open('popup_sendmsg.asp', 'msgWin', 'toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, copyhistory=0, width=500, height=550, ' + getCenter(500, 550));
}

function sendCCMessage(frm){
	
	var errMsj = "";
	
	with (frm) {
		
		if (txtName.value == "" || selImages.value == "" || txtMessage.value == "")
			errMsj = "Gerekli alanları doldurmalısınız !"

	}

	if(errMsj != ""){
		errMsj = "------------ GÖNDERİLEMEDİ ÇÜNKÜ YANLIŞLIK VAR ------------\n\n" + errMsj;
		alert(errMsj);
	}else{
		frm.submit();
	}
}

function sendContactMsg(frm){
	var errMsj = "";
	
	if(frm.txtName.value == "")
		errMsj = "İsmini yazmamışsın ...\n"
	
	if(frm.txtMail.value == "")
		errMsj += "Mail adresini yazmamışsın ...\n"

	
	if(frm.txtMessage.value == "")
		errMsj += "Diyecek bişeyin yok mu? ...\n"

	
	if(errMsj != ""){
		errMsj = "------------ GÖNDERİLEMEDİ ÇÜNKÜ YANLIŞLIK VAR ------------\n\n" + errMsj;
		alert(errMsj);
	}else{
		frm.submit();
	}
}
