﻿function popUp(URL) {
day = new Date();
//id = day.getTime();
id = 'EIBphoto';
//eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 440,top = 225');");
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=800');");
//alert("page" + id + ".focus");
eval("page" + id + ".focus();");

}

function addTag(objText, tag) {    
    var obj = document.getElementById(objText);
    if(tag=="br"){
        var openTag = "";
    	var closeTag = "[br/]";
    } else {
    var openTag = "[" + tag + "]";
    var closeTag = "[/" + tag + "]";
    }
    
    if(obj.createTextRange) 
		 {
			selectedText = document.selection.createRange().text;
			if (selectedText!='')
			{
				document.selection.createRange().text = openTag + selectedText + closeTag;
			}		
		 } 
		 else if( obj.setSelectionRange  ) 
		 {

		   var len2 = obj.selectionEnd;
		   var len1 = obj.selectionStart;	
		   if(len2 > len1){
			   obj.value = obj.value.substr( 0, len1 )
				 + openTag + obj.value.substr(len1, len2-len1 )
				 + closeTag + obj.value.substr( len2 );
		   }  
	 } 
    }
function submitform()
{
 document.myform.submit();
}


function makevisible(cur,which){
strength=(which==0)? 1 : 0.2

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}

function borderit(which,color){
//if IE 4+ or NS 6+
//which.style['border-color']='yellow';
if (document.all||document.getElementById){
//which.style.border='1px ' + color + ' solid';
which.style.backgroundColor=color;
//which.style.borderColor=color;

}
}

function alertDelete(msgtxt){
	var is_confirmed = confirm(msgtxt);
	return is_confirmed;
}

function footer() {
alert(document.body.offsetHeight);
if (document.body.offsetHeight>100){ 
alert(document.getElementById('footer').style.top);

	document.getElementById('footer').style.top=(document.body.clientHeight-25)+"px"; 
	} 

}
