	function getObject(obj){
		var theObj;
		if(document.layers){
			if(typeof obj == 'string') return document.layers[obj]
			else return obj
		}
		if(document.all){
			if(typeof obj == 'string'){
				if(document.all(obj)!=null)return document.all(obj).style
				else return null
			}
			else return obj.style
		}
		if(document.getElementById){
			if(typeof obj == 'string')return document.getElementById(obj).style
			else return obj.style
		}
		return null;
	}
	function show(obj){
		var theObj=getObject(obj);
		if(typeof theObj.visibility != 'undefined') theObj.visibility='visible';
		if(typeof theObj.display != 'undefined') theObj.display='block';
	}
	function hide(obj){
		var theObj=getObject(obj);
		if(typeof theObj.visibility != 'undefined') theObj.visibility='hidden';
		if(typeof theObj.display != 'undefined') theObj.display='none';
	}
	function InsertBBCode(o,a,b){
		element = document.getElementById(o);
		element.focus(); 
		if (document.selection) { 
			SelectedText = element.document.selection.createRange(); 
			SelectedText.text = a+SelectedText.text+b; 
		}
	}


	function M_over(img,ref) { document.images[img].src = ref; } 
	function M_out(img,ref) { document.images[img].src = ref; } 
	
	var first_click_login = true;
	function clicklogin(){
		
		if(first_click_login == true){
			element = document.getElementById('UserLogin');
			element.value = "";
			first_click_login = false;
		}		
	}
	var first_click_pass = true;
	function clickpass(){
		if(first_click_pass == true){
			element = document.getElementById('UserPassword');
			element.value = "";
			first_click_pass = false;
		}		
	}
	var first_click_support = true;
	function clicksupport(){
		if(first_click_support == true){
			element = document.getElementById('SupportText');
			element.value = "";
			first_click_support = false;
		}		
	}	

	function checkEnter(event){
		if (event.keyCode == 13){
			document.login_form.submit();
		}
   	}
	
	var v_vm = false;
	shortcut("Ctrl+X",function() {
		if(v_vm){
			hide("vm");
			v_vm = false;
		}else{
			show("vm");
			v_vm = true;
		}
	});	

	function get_ajax_img(url,img,f,t){
    	$.get(url, function(res){
			res = res.replace(/^\s+/, '');
			text = res.split(";#");
			if (text[0] == "0"){
				if(text[1] == '1'){
					img.src = t;
				}else{
					img.src = f;
				}					
			}else{
			}
		});	
	}

