function $(id) {
	return document.getElementById(id);
}
function show(id){
	$(id).style.display="block";
}
function hide(id){
	$(id).style.display="none";
}
function swich(id){
	if($(id).style.display=="none"){
		$(id).style.display="block";
	}else{
		$(id).style.display="none";
	}
}
function colorBg(id,col){
	$(id).style.backgroundColor=col;
}
function newWinGM(urlLoc1) {
    _winName1 = 'MNewWindow1';
    _info  = 'toolbar=0';    
    _info += ',location=0';  
    _info += ',directories=0'; 
    _info += ',status=0';     
    _info += ',menubar=0';    
    _info += ',scrollbars=1';
    _info += ',resizable=1'; 
    _info += ',refresh the parent=1';     
    _info += ',height=700';
    _info += ',width=805';
    _info += ',left=40';
    _info += ',top=30';
    DispWin1=window.open(urlLoc1,_winName1,_info);
    DispWin1.focus();
    return false;
}
function openCalendar(params, form, field, type){
	window.open("http://"+window.location.hostname+"/includes/calendar.inc.php?" + params, "calendar", "width=400,height=200,status=yes");
	dateField = eval("document." + form + "." + field);
	dateType = type;
}
var http_request = false;   
function makePOSTRequest(url, parameters){
	http_request = false;
		if(window.XMLHttpRequest){
			http_request = new XMLHttpRequest();
				if(http_request.overrideMimeType){
					http_request.overrideMimeType('text');
				}
		}else if(window.ActiveXObject){
			try{
				http_request = new ActiveXObject("Msxml2.XMLHTTP");
			}catch(e){
				try{
					http_request = new ActiveXObject("Microsoft.XMLHTTP");
				}catch(e){
					
				}
			}
		}
		if(!http_request)return false;
		http_request.onreadystatechange=alertContents;
		
		http_request.open('POST', url, true);
      	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      	http_request.setRequestHeader("Content-length", parameters.length);
      	http_request.setRequestHeader("Connection", "close");
      	http_request.send(parameters);
}
function alertContents(){
	if(http_request.readyState == 4){
		if(http_request.status == 200){
			eval(http_request.responseText);
		}else{
			return false;
		}
	}
}
function addEvent(elm,evType,fn,useCapture){
	if(elm.addEventListener){
		elm.addEventListener(evType,fn,useCapture);
		return true;
	}else if(elm.attachEvent){
		var r=elm.attachEvent("on"+evType,fn);
		return r;
	}
}

function runAll(){
	fixBodyHeight();
	
}
function fixBodyHeight(){
	var curentHeight=(580 - ($('body_container').scrollHeight + 70));
	var curentHeight=parseInt(curentHeight);
	if($('body_container').scrollHeight < 500)$('body_container').style.paddingBottom=curentHeight+"px";
}
addEvent(window,'load',runAll);

function h_setCity(){
	if($('city1').value==0){
		show('city2');
		$('city2').focus();
		$('pcode').readonly=false;
	}else{
		hide('city2');
		$('city2').value="";
		makePOSTRequest('https://'+window.location.hostname+'/js/php/setCity.php',"loid="+$('city1').value);
	}
}
function h_setRoom(){
	if($('type').value==0){
		show('type2');
		$('type2').focus();
	}else{
		hide('type2');
		$('type2').value="";
	}
}
function sw_room_Breakfast(){
	if($('breakfast_sw').value==0){
		show('breakfast_blk_0');
		show('breakfast_blk_1');
		$('breakfast_blk_0').focus();
	}else{
		hide('breakfast_blk_0');
		hide('breakfast_blk_1');
		$('breakfast').value="";
		$('breakfast_ch').value="";
	}
}
function sw_room_turist_tax(){
	if($('turist_tax_sw').value==0){
		show('turist_tax_blk_0');
		show('turist_tax_blk_1');
		$('turist_tax').focus();
	}else{
		hide('turist_tax_blk_0');
		hide('turist_tax_blk_1');
		$('turist_tax').value="";
		$('turist_tax_ch').value="";
	}
}
function fullYearCheck(){
	if($('fullyear').value==0){
		hide('base_price_blk');
		hide('base_price_blk_ch');
		hide('base_price_blk_eb');
		hide('base_price_blk_ebc');
		$('base_price').value="0";
		$('base_price_ch').value="0";
		$('base_price_eb').value="0";
		$('base_price_ebc').value="0";
	}else{
		show('base_price_blk');
		show('base_price_blk_ch');
		show('base_price_blk_eb');
		show('base_price_blk_ebc');
		$('base_price').value="0";
		$('base_price_ch').value="0";
		$('base_price_eb').value="0";
		$('base_price_ebc').value="0";
	}
}
function remPhoto(hid,num){
	hide('htl_add_blk_main_pic_'+num);
	if(num==0){
		hide('submit2');
	}
	makePOSTRequest('https://'+window.location.hostname+'/js/php/remPhoto.php',"hid="+hid+"&num="+num+"");
}
function remPhoto2(rid,num){
	hide('htl_add_blk_main_pic_'+num);
	if(num==0){
		hide('submit2');
	}
	makePOSTRequest('https://'+window.location.hostname+'/js/php/remPhoto.php',"rid="+rid+"&num="+num+"");
}
function checkBaseForm(){
	var ok=0;
	if($('type').value == 1000){
		$('type').style.backgroundColor="red";
		ok=1;
	}else{
		$('type').style.backgroundColor="white";
	}
	if($('stars').value == 1000){
		$('stars').style.backgroundColor="red";
		ok=1;
	}else{
		$('stars').style.backgroundColor="white";
	}
	if($('name_1').value.length < 3){
		$('name_1').style.backgroundColor="red";
		ok=1;
	}else{
		$('name_1').style.backgroundColor="white";
	}
	if($('name_2').value.length < 3){
		$('name_2').style.backgroundColor="red";
		ok=1;
	}else{
		$('name_2').style.backgroundColor="white";
	}
	if($('pcode').value.length < 3){
		$('pcode').style.backgroundColor="red";
		ok=1;
	}else{
		$('pcode').style.backgroundColor="white";
	}
	if($('city1').value == 10000){
		$('city1').style.backgroundColor="red";
		ok=1;
	}else{
		$('city1').style.backgroundColor="white";
	}
	if($('city1').value == 0){
		if($('city2').value.length < 3){
			$('city2').style.backgroundColor="red";
			ok=1;
		}else{
			$('city2').style.backgroundColor="white";
		}
	}
	
	if($('address_1').value.length < 3){
		$('address_1').style.backgroundColor="red";
		ok=1;
	}else{
		$('address_1').style.backgroundColor="white";
	}
	if($('address_2').value.length < 3){
		$('address_2').style.backgroundColor="red";
		ok=1;
	}else{
		$('address_2').style.backgroundColor="white";
	}
	if($('phone').value.length < 3){
		$('phone').style.backgroundColor="red";
		ok=1;
	}else{
		$('phone').style.backgroundColor="white";
	}
	if($('contact').value.length < 3){
		$('contact').style.backgroundColor="red";
		ok=1;
	}else{
		$('contact').style.backgroundColor="white";
	}
	if($('mail').value.length < 3){
		$('mail').style.backgroundColor="red";
		ok=1;
	}else{
		$('mail').style.backgroundColor="white";
	}
	
	if(navigator.appName=="Microsoft Internet Explorer"){
		if($('description_1').innerHTML.length < 3){
			$('description_1').style.backgroundColor="red";
			ok=1;
		}else{
			$('description_1').style.backgroundColor="white";
		}
		if($('description_2').innerHTML.length < 3){
			$('description_2').style.backgroundColor="red";
			ok=1;
		}else{
			$('description_2').style.backgroundColor="white";
		}
		if($('facilities_1').innerHTML.length < 3){
			$('facilities_1').style.backgroundColor="red";
			ok=1;
		}else{
			$('facilities_1').style.backgroundColor="white";
		}
		if($('facilities_2').innerHTML.length < 3){
			$('facilities_2').style.backgroundColor="red";
			ok=1;
		}else{
			$('facilities_2').style.backgroundColor="white";
		}
	}else{
		if($('description_1').value.length < 3){
			$('description_1').style.backgroundColor="red";
			ok=1;
		}else{
			$('description_1').style.backgroundColor="white";
		}
		if($('description_2').value.length < 3){
			$('description_2').style.backgroundColor="red";
			ok=1;
		}else{
			$('description_2').style.backgroundColor="white";
		}
		if($('facilities_1').value.length < 3){
			$('facilities_1').style.backgroundColor="red";
			ok=1;
		}else{
			$('facilities_1').style.backgroundColor="white";
		}
		if($('facilities_2').value.length < 3){
			$('facilities_2').style.backgroundColor="red";
			ok=1;
		}else{
			$('facilities_2').style.backgroundColor="white";
		}
	
	}
	
	if($('inet').value == 1000){
		$('inet').style.backgroundColor="red";
		ok=1;
	}else{
		$('inet').style.backgroundColor="white";
	}
	if($('parking').value == 1000){
		$('parking').style.backgroundColor="red";
		ok=1;
	}else{
		$('parking').style.backgroundColor="white";
	}
	if($('accomm_from').value == 1000){
		$('accomm_from').style.backgroundColor="red";
		ok=1;
	}else{
		$('accomm_from').style.backgroundColor="white";
	}
	if($('accomm_to').value == 1000){
		$('accomm_to').style.backgroundColor="red";
		ok=1;
	}else{
		$('accomm_to').style.backgroundColor="white";
	}
	
	if($('departure_from').value == 1000){
		$('departure_from').style.backgroundColor="red";
		ok=1;
	}else{
		$('departure_from').style.backgroundColor="white";
	}
	if($('departure_to').value == 1000){
		$('departure_to').style.backgroundColor="red";
		ok=1;
	}else{
		$('departure_to').style.backgroundColor="white";
	}
	
	if(ok==0){
		$('submit').disabled=false;
	}else{
		$('submit').disabled=true;
	}
}
function checkAccept(){
	if($('repre_acc').checked==true){
		$('submit_acc').disabled=false;
		
		if($('repre_name').value.length < 3){
			$('repre_name').style.backgroundColor="red";
			$('submit_acc').disabled=true;
		}else{
			$('repre_name').style.backgroundColor="white";
			$('submit_acc').disabled=false;
		}
		
		if($('repre_pos').value.length < 2){
			$('repre_pos').style.backgroundColor="red";
			$('submit_acc').disabled=true;
		}else{
			$('repre_pos').style.backgroundColor="white";
			$('submit_acc').disabled=false;
		}
		
	}else{
		$('submit_acc').disabled=true;
	}
}
function checkReservResp(){
	var ok=0;
	if($('res_name').value.length < 3){
		$('res_name').style.backgroundColor="red";
		ok=1;
	}else{
		$('res_name').style.backgroundColor="white";
	}
	
	if($('res_phone').value.length < 3){
		$('res_phone').style.backgroundColor="red";
		ok=1;
	}else{
		$('res_phone').style.backgroundColor="white";
	}
	
	if($('res_fax').value.length < 3){
		$('res_fax').style.backgroundColor="red";
		ok=1;
	}else{
		$('res_fax').style.backgroundColor="white";
	}
	
	if($('res_mail').value.length < 3){
		$('res_mail').style.backgroundColor="red";
		ok=1;
	}else{
		$('res_mail').style.backgroundColor="white";
	}
	
	if(ok==0){
		$('submit_acc').disabled=false;
	}else{
		$('submit_acc').disabled=true;
	}
}

function checkFinanceResp(){
	var ok=0;
	if($('fin_name').value.length < 3){
		$('fin_name').style.backgroundColor="red";
		ok=1;
	}else{
		$('fin_name').style.backgroundColor="white";
	}
	if($('fin_phone').value.length < 3){
		$('fin_phone').style.backgroundColor="red";
		ok=1;
	}else{
		$('fin_phone').style.backgroundColor="white";
	}
	if($('fin_fax').value.length < 3){
		$('fin_fax').style.backgroundColor="red";
		ok=1;
	}else{
		$('fin_fax').style.backgroundColor="white";
	}
	if($('fin_mail').value.length < 3){
		$('fin_mail').style.backgroundColor="red";
		ok=1;
	}else{
		$('fin_mail').style.backgroundColor="white";
	}
	if($('inv_company_name').value.length < 3){
		$('inv_company_name').style.backgroundColor="red";
		ok=1;
	}else{
		$('inv_company_name').style.backgroundColor="white";
	}
	if($('inv_mol').value.length < 3){
		$('inv_mol').style.backgroundColor="red";
		ok=1;
	}else{
		$('inv_mol').style.backgroundColor="white";
	}
	if($('inv_vat_num').value.length < 3){
		$('inv_vat_num').style.backgroundColor="red";
		ok=1;
	}else{
		$('inv_vat_num').style.backgroundColor="white";
	}
	if($('inv_address').value.length < 3){
		$('inv_address').style.backgroundColor="red";
		ok=1;
	}else{
		$('inv_address').style.backgroundColor="white";
	}
	
	if(ok==0){
		$('submit_acc').disabled=false;
	}else{
		$('submit_acc').disabled=true;
	}
}

function checkRoomForm(){
	var ok=0;
	if($('availability').value.length < 1){
		$('availability').style.backgroundColor="red";
		ok=1;
	}else{
		$('availability').style.backgroundColor="white";
	}
	if($('beds').value.length < 1){
		$('beds').style.backgroundColor="red";
		ok=1;
	}else{
		$('beds').style.backgroundColor="white";
	}
	if($('type').value == 1000){
		$('type').style.backgroundColor="red";
		ok=1;
	}else{
		$('type').style.backgroundColor="white";
	}
	if($('extra_beds').value == 1000){
		$('extra_beds').style.backgroundColor="red";
		ok=1;
	}else{
		$('extra_beds').style.backgroundColor="white";
	}
	if($('breakfast_sw').value == 1000){
		$('breakfast_sw').style.backgroundColor="red";
		ok=1;
	}else{
		$('breakfast_sw').style.backgroundColor="white";
	}
	if($('breakfast_sw').value == 0){
		if($('breakfast').value.length < 1){
			$('breakfast').style.backgroundColor="red";
			ok=1;
		}else{
			$('breakfast').style.backgroundColor="white";
		}
		if($('breakfast_ch').value.length < 1 ){
			$('breakfast_ch').style.backgroundColor="red";
			ok=1;
		}else{
			$('breakfast_ch').style.backgroundColor="white";
		}
	}else{
		$('breakfast').style.backgroundColor="white";
		$('breakfast_ch').style.backgroundColor="white";
	}
	
	if($('turist_tax_sw').value == 1000){
		$('turist_tax_sw').style.backgroundColor="red";
		ok=1;
	}else{
		$('turist_tax_sw').style.backgroundColor="white";
	}
	if($('turist_tax_sw').value == 0){
		if($('turist_tax').value.length < 1){
			$('turist_tax').style.backgroundColor="red";
			ok=1;
		}else{
			$('turist_tax').style.backgroundColor="white";
		}
		if($('turist_tax_ch').value.length < 1 ){
			$('turist_tax_ch').style.backgroundColor="red";
			ok=1;
		}else{
			$('turist_tax_ch').style.backgroundColor="white";
		}
	}else{
		$('turist_tax').style.backgroundColor="white";
		$('turist_tax_ch').style.backgroundColor="white";
	}
	
	if($('fullyear').value==1){ //ДА
		$('S1_S').style.backgroundColor="white";
		$('S1_E').style.backgroundColor="white";
		$('S1_P').style.backgroundColor="white";
		$('S1_CH').style.backgroundColor="white";
		$('S1_EB').style.backgroundColor="white";
		$('S1_EBC').style.backgroundColor="white";
		
		if($('base_price').value == 0){
			$('base_price').style.backgroundColor="red";
			ok=1;
		}else{
			$('base_price').style.backgroundColor="white";
		}
		
		if($('base_price_ch').value < 1){
			$('base_price_ch').style.backgroundColor="red";
			ok=1;
		}else{
			$('base_price_ch').style.backgroundColor="white";
		}
				
	}else{
		if($('S1_S').value.length < 1){
			$('S1_S').style.backgroundColor="red";
			ok=1;
		}else{
			$('S1_S').style.backgroundColor="white";
		}
		if($('S1_E').value.length < 1){
			$('S1_E').style.backgroundColor="red";
			ok=1;
		}else{
			$('S1_E').style.backgroundColor="white";
		}
		if($('S1_P').value < 1){
			$('S1_P').style.backgroundColor="red";
			ok=1;
		}else{
			$('S1_P').style.backgroundColor="white";
		}
		if($('S1_CH').value < 1){
			$('S1_CH').style.backgroundColor="red";
			ok=1;
		}else{
			$('S1_CH').style.backgroundColor="white";
		}
	}
	if(($('extra_beds').value > 0) && ($('extra_beds').value < 1000)){
		if($('base_price_eb').value.length < 1){
			$('base_price_eb').style.backgroundColor="red";
			ok=1;
		}else{
			$('base_price_eb').style.backgroundColor="white";
		}
		if($('base_price_ebc').value.length < 1){
			$('base_price_ebc').style.backgroundColor="red";
			ok=1;
		}else{
			$('base_price_ebc').style.backgroundColor="white";
		}
		if($('fullyear').value==0){
			if($('S1_EB').value.length < 1){
				$('S1_EB').style.backgroundColor="red";
				ok=1;
			}else{
				$('S1_EB').style.backgroundColor="white";
			}
			if($('S1_EBC').value.length < 1){
				$('S1_EBC').style.backgroundColor="red";
				ok=1;
			}else{
				$('S1_EBC').style.backgroundColor="white";
			}
		}
	}else{
		$('base_price_eb').style.backgroundColor="white";
		$('base_price_ebc').style.backgroundColor="white";
	}
	
	if(ok==0){
		$('submit').disabled=false;
	}else{
		$('submit').disabled=true;
	}
}

function set_load(day,c,hid){
	var ids_num=$('c_ids').value.split(',');
	var values='';
	for(n=ids_num.length;n>0;n--){
		var el='rv'+(c-n);
		values+=$(el).value;
		if(n!=1)values+=',';
	}
	var poststr="year="+$('c_year').value+"&month="+$('c_month').value+"&day="+day+"&r_ids="+$('c_ids').value+"&values="+values+"&hid="+hid;
	makePOSTRequest('https://'+window.location.hostname+'/js/php/setLoad.php',poststr);
}

function set_loadAll(days,hid,set){
	var ids_num=$('c_ids').value.split(',');
	var values='';
	for(n=ids_num.length;n>0;n--){
		var el='rv'+(n);
		values+=set;
		if(n!=1)values+=',';
	}
	var z=new Array();
	
	for(var d=1;d<days;d++){
		if(set==0)$('rv'+(d-1)).value=0;
		poststr="year="+$('c_year').value+"&month="+$('c_month').value+"&day="+d+"&r_ids="+$('c_ids').value+"&values="+values+"&hid="+hid;
		z[d]=window.setTimeout("makePost('"+poststr+"')",(80*d));
	}
	window.setTimeout("$('msubmit').submit()",2500);
}
function slb(day,bgc,val){
	$('day'+day).style.backgroundColor=bgc;
	$('tot_fr_rms'+day).innerHTML=val;
}

function makePost(pststr){
	makePOSTRequest('https://'+window.location.hostname+'/js/php/setLoad.php',pststr);
}

function h_btn_set1(){
	show('h_info_h_img_text');
	hide('h_info_h_gallery');
	$('h_btn_set_1').style.backgroundColor='#80CAFF';
	$('h_btn_set_2').style.backgroundColor='#B4E0FF';
}
function h_btn_set2(){
	show('h_info_h_gallery');
	hide('h_info_h_img_text');
	$('h_btn_set_2').style.backgroundColor='#80CAFF';
	$('h_btn_set_1').style.backgroundColor='#B4E0FF';
}
function checkSearch(){
	if($('searchfrm')){
		if($('searchfrm').value.length < 2){
			$('searchfrm').style.backgroundColor='red';
			$('srchsubmit').style.color="#CCCCCC";
			$('srchsubmit').disabled=true;
		}else{
			$('searchfrm').style.backgroundColor='white';
			$('srchsubmit').style.color="#FFFFFF";
			$('srchsubmit').disabled=false;
		}
	}
}
function checkResForm(){
	var ok=1;
	var color_ok='white';
	
	if($('next').value==2){
		color_ok='white';
	}else{
		color_ok='#E6F4FF';
	}
	
	if($('fname').value.length < 2){
		$('fname').style.backgroundColor='red';
		ok=0;
	}else{
		$('fname').style.backgroundColor=color_ok;
	}
	
	if($('lname').value.length < 2){
		$('lname').style.backgroundColor='red';
		ok=0;
	}else{
		$('lname').style.backgroundColor=color_ok;
	}
	
	if($('mail').value.length < 2){
		$('mail').style.backgroundColor='red';
		ok=0;
	}else{
		$('mail').style.backgroundColor=color_ok;
	}
	if($('mail2').value.length < 2){
		$('mail2').style.backgroundColor='red';
		ok=0;
	}else{
		$('mail2').style.backgroundColor=color_ok;
	}
	
	if($('mail').value != $('mail2').value){
		$('mail2').style.backgroundColor='red';
		ok=0;
	}else{
		$('mail2').style.backgroundColor=color_ok;
	}
	
	if($('cnumber').value.length < 10){
		$('cnumber').style.backgroundColor='red';
		ok=0;
	}else{
		$('cnumber').style.backgroundColor=color_ok;
		// Credit Card Block
		
		$('cnumber').value=$('cnumber').value.replace(/\D/g, '');
		if($('cnumber').value.length > 15){
			if($('ctype').value == 0){
				var result=luhn_check($('cnumber').value);
				if(result==false){
					$('cnumber').style.backgroundColor='red';
					ok=0;
				}else{
					$('cnumber').style.backgroundColor=color_ok;
				}
			}
		}else{
			$('cnumber').style.backgroundColor='red';
			ok=0;
		}
		//
	}
	if($('cnames').value.length < 10){
		$('cnames').style.backgroundColor='red';
		ok=0;
	}else{
		$('cnames').style.backgroundColor=color_ok;
	}
	
	if($('ccv').value.length < 3){
		$('ccv').style.backgroundColor='red';
		ok=0;
	}else{
		$('ccv').style.backgroundColor=color_ok;
	}
	
	
	
	if($('accept').checked == true){
		$('accept_blk').style.backgroundColor='#E6F4FF';
	}else{
		$('accept_blk').style.backgroundColor='red';
		ok=0;
	}
	
	
	if($('total').value == 0){
		$('r_total').style.backgroundColor='red';
		ok=0;
	}else{
		$('r_total').style.backgroundColor='#FFF1E5';
	}
	
	if(ok==0){
		$('reserv').disabled=true;
		$('reserv').style.color="#CCCCCC";
	}else{
		$('reserv').disabled=false;
		$('reserv').style.color="#FFFFFF";
	}
	
	for(a=0;a<10;a++){
	
		if($('p'+a)){
			if($('p'+a).value==0){
				$('ch'+a).disabled=true;
			}else{
				$('ch'+a).disabled=false;
			}
		}
	}
	fv();
}
function luhn_check(number){
	var number=number.replace(/\D/g, '');
	var number_length=number.length;
	var parity=number_length % 2;
	var total=0;
	
	for(i=0;i<number_length;i++){
		var digit=number.charAt(i);
		if(i % 2 == parity){
			digit=digit * 2;
			if(digit>9)digit=digit-9;
		}
		total=total+parseInt(digit);
	}
	if(total % 10 == 0){
		return true;
	}else{
		return false
	}
}
function fv(){
	$('fname2').value=$('fname').value;
	$('lname2').value=$('lname').value;
	$('mail2a').value=$('mail').value;
	$('mail2b').value=$('mail2').value;
	
	$('ctype2').value=$('ctype').value;
	$('cnumber2').value=$('cnumber').value;
	$('cnames2').value=$('cnames').value;
	$('cvm2').value=$('cvm').value;
	$('cvy2').value=$('cvy').value;
	$('ccv2').value=$('ccv').value;
	$('city2').value=$('city').value;
	$('pcode2').value=$('pcode').value;
	$('address2').value=$('address').value;
	$('phone2').value=$('phone').value;
	$('hmessage2').value=$('hmessage').value;
	$('total').value=$('total2').value;
	
	if($('accept').checked == true){
		$('accept2').value=1;
	}else{
		$('accept2').value=0;
	}
	if($('subscribe').checked == true){
		$('subscribe2').value=1;
	}else{
		$('subscribe2').value=0;
	}
}
function chroomsel(){
	var sel=0;
	if($('room_nums')){
		for(var a=0;a<$('room_nums').value;a++){
			sel+=$("rn"+a+"").value;
		}
		if(sel==0){
			$('submit_rms').disabled=true;
		}else{
			$('submit_rms').disabled=false;
		}
	}
}
function buildKeyword(){
	var keyword="";
	keyword=$('name_2').value;
	keyword=keyword.replace('"',"");;
	keyword=keyword.replace('-'," ");;
	keyword=keyword.replace('&'," and ");;
	
	$('keyword').value=keyword;
}