// JavaScript Document
function ch_img(id,sr){
	document.getElementById(id).src = sr;
}

function ch_style(id,cl){
	document.getElementById(id).className = cl;
}

function hide(id){
	document.getElementById(id).style.display = "none";
}

function show(id){
	document.getElementById(id).style.display = "";
}

function showHide(id){
	stat = document.getElementById(id).style.display;
	if(stat == 'none'){
		document.getElementById(id).style.display = "";
	}
	else{
		document.getElementById(id).style.display = "none";
	}
}
function ch_inp(w,mode,id){
	if(mode == 'blur'){
		if(document.getElementById(id).value == ''){
			document.getElementById(id).value = w;
		}
		
	}
	else{
		if(document.getElementById(id).value == w){
			document.getElementById(id).value = '';
		}
	}
}
function add_style(o,c1){
	if(!check_style(o,c1)){o.className+=o.className?' '+c1:c1;}
}
function rm_style(o,c1){
	var rep=o.className.match(' '+c1)?' '+c1:c1;
    o.className=o.className.replace(rep,'');
}
function check_style(o,c1){
	return new RegExp('\\b'+c1+'\\b').test(o.className)
}
