/* return fullpath with lang */
function base_url()
{
	var hostName = document.location.hostname;
	var pathName = document.location.pathname;
	
	// get lang
	var temp = pathName.split('/');
	return 'http://' + hostName + '/' + temp[1] + '/';
}


function popWin(url,w,h) {
	var winl=(screen.width-w) / 2;
	var wint=(screen.height-h) / 2;
	var newWindow
	newWindow = window.open(url,"nWin","scrollbars=yes,status=no,location=no,toolbar=no,menubar=no,directories=no,resizable=yes,width="+w+",height="+h+",top="+wint+",left="+winl+"")
}


jQuery.fn.extend({
	embedSWF: function(settings , pluginOptions ){
			var o = jQuery.extend({ expressInstall:"js/swfobject/expressInstall.swf",version:'8.0.0'}, settings);
			if(swfobject.flagSwitchOff){
				swfobject.switchOffAutoHideShow();
				swfobject.flagSwitchOff = false;
			}
			for(var key in o.flashvars) o.flashvars[key] = encodeURIComponent(o.flashvars[key]);
			
			return this.each(function() {
				
				var swfId = this.id||("swfobject_"+Math.round(Math.random()* 1000));
				var swfName = this.name||swfId;
				var swfWidth = o.width||$(this).width();
				var swfHeight = o.height||$(this).height();
				swfobject.embedSWF(o.src, swfId, swfWidth, swfHeight, o.version,o.expressInstall ,o.flashvars,$.extend({wmode:o.wmode||"opaque"},o.params));
			});
		}
});

function contactForm_Default(name,valueshow){
	var show_txt = $(name).val();
	if(show_txt == ""){
		$(name).val(valueshow);
	}
	$(name).click(function(){
		var show_set = $(name).val();
		if(show_set == valueshow){
			$(name).val("");
		}
	});
	$(name).blur(function(){
		var show_set = $(name).val();
		if(show_set == ""){
			$(name).val(valueshow);
		}
	});
}

