// JavaScript Document
function ie(){
	if(!isIEM()){
		if(isIE()){	
			//png alpha
			var images=document.getElementsByTagName("img");
			var newimages=new Array();	
			for(var i=0;i<images.length;i++){
				if(images[i].src.substring(images[i].src.length-4)==".png"){
					var img=new Image();
					img.id=images[i].id;
					img.src=rtPh()+"scripts/ie/tmp.png";
					img.style.position=images[i].style.position;
					img.style.left=images[i].style.left;
					img.style.top=images[i].style.top;
					img.style.width=images[i].style.width;
					img.style.height=images[i].style.height;
					img.style.display=images[i].style.display;
					img.style.border=images[i].style.border;
					img.className=images[i].className;
					img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+images[i].src+"',sizingMethod='scale')";
					newimages.push(new Array(images[i],img));	
				}
			}
			for(i=0;i<newimages.length;i++){
				newimages[i][0].parentNode.replaceChild(newimages[i][1],newimages[i][0]);	
			}
			init();			
		}else{
			init();	
		}
	}else{
		init();	
	}
}
function isIEV(p_vers){
	if(isIE()){
		if(Number(navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5,1))>=p_vers){
			return true;														   
		}
	}
	return false;
}
function isIE(){
	if(navigator.appName.indexOf("Microsoft")>-1){
		return true;	
	}
	return false;
}
function isIEM(){
	if(navigator.appName.indexOf("IE Mobile")>-1){
		return true;	
	}
	return false;
}
function isNF(){
	if(navigator.userAgent.indexOf("NetFront")>-1){
		return true;	
	}
	return false;
}
function isNFVers(p_maxv){
	if(isNF()){
		if(parseFloat(navigator.appVersion)<=p_maxv){
			return true;	
		}
	}
	return false;
}
function isOM(){
	if(navigator.userAgent.indexOf("Opera Mini")>-1){
		return true;	
	}
	return false;
}
function isSFM(){
	if((navigator.userAgent.indexOf("Safari")>-1)&&(navigator.userAgent.indexOf("Mobile")>-1)){
		return true;	
	}
	return false;
}
function enPos(){
	var img=new Image();
	try{
		img.style.position="absolute";
		img.style.left="0px";
		img.style.top="0px";		
		return true;
	}catch(e){
		return false;	
	}
}
function setFilter(p_obj,p_flt){
	if(p_obj.style.filter.length==0){
		p_obj.style.filter=p_flt;
	}else{
		var tmpflt=p_obj.style.filter;
		var index=p_obj.style.filter.indexOf(p_flt.substring(0,p_flt.indexOf("("))+"(");
		if(index>-1){
			if(index==0){
				tmpflt=p_flt;
			}else{
				tmpflt=p_obj.style.filter.substring(0,index)+p_flt;
			}
			var endindex=index+p_obj.style.filter.substring(index).indexOf(")")+1;			
			if(endindex<p_obj.style.filter.length){
				tmpflt=tmpflt+p_obj.style.filter.substring(endindex);
			}
			p_obj.style.filter=tmpflt;
		}else{
			p_obj.style.filter=p_flt+tmpflt;
		}
	}
}
function setAlpha(p_obj,p_value){
	if(isIE()){
		setFilter(p_obj,"alpha(opacity="+String(p_value)+")");
	}else{
		p_obj.style.opacity=p_value/100;
	}
}