/**
 * @author Timo 9.09.2005
 */
Log.frameTool=new Object();//FINAL, NO NEED FOR NEW INSTANCES

Log.frameTool.writeIframe=function(HtmlToWrite,validator){
	if(HtmlToWrite!=null&&HtmlToWrite!=''){
		var v_document=window.frames.downloadFrame.document;
		v_document.open();
		v_document.write(HtmlToWrite);
		v_document.close();
		var HtmlResult=v_document.body.innerHTML;
		//if(HtmlToWrite!=HtmlResult){//never will be the same 
		//if(validator!=null&&HtmlResult.indexOf(validator)==-1){
		//v_document.body.innerHTML=HtmlToWrite+scriptTag;
		//}
		/*
		if(Log.browserTool._bMSIE==true){//??
		a lert(Log.getPhrase(32));
		}
		 */
	}
}//writeIframe

/**
 */
Log.frameTool.updateParent=function(){
	//alert(parent.Log.getPhrase(32,'I am back again.'));
	var iWhile=arguments.length;
	while(iWhile>0){
		iWhile=iWhile-1;
		try{
			eval("parent."+arguments[iWhile]+"="+arguments[iWhile]+";");
		}catch(e_rror){Log.showExeption( e_rror, 'Log.frameTool.copyFrameArrays');}
	}//while(iWhile>0
}//updateParent

/**
 * 
 */
Log.frameTool.write=function(s_tring){
	var v_document=window.frames.downloadFrame.document;
	v_document.write(s_tring);
}//write

//public static 
Log.frameTool.revealFrame=function(id,url,height){
	var METHOD="revealFrame";
	var frameElement=document.getElementById(id);
	if(url==null){url=frameElement.title;}
	if(height==null){height=screen.height+'px';}//'100%';} Firefox
	frameElement.src=url;
	frameElement.height=height;
	frameElement.style.height=height;
	return true;
}//replaceInnerHtml

/**
 * @author unknown
 * @see http://www.novosystems.ee/navici/
Log.frameTool.copyValuesToParentFrame=function (eVent){
     var dest=parent.document.forms['rpccall'];
     var src=document.forms['map'];
    try{
     for(var i=0;i<src.elements.length;i++) 
    {
         var srcfield=src.elements[i];
         var dstfield=dest.elements[srcfield.name];
         if (dstfield) dstfield.value=srcfield.value;
     }
     parent.updateMap(dstfield+' '+dstfield.value);
    }catch(e_rror){Log.showExeption( e_rror, 'Log.frameTool.copyValuesToParentFrame');}
    Log.eventTool.stopEvent(eVent);
}//copyValuesToParentFrame
 */

/**

Log.frameTool.copyFrameArrays=function (eVent){
    var iWhile=arguments.length;
    while(iWhile>0){
        iWhile=iWhile-1;
        //try{
            eval(arguments[iWhile]+"=window.frames.downloadFrame."+arguments[iWhile]+";");
        //}catch(e_rror){Log.showExeption( e_rror, 'Log.frameTool.copyFrameArrays');}
    }//while(iWhile>0
    Log.eventTool.stopEvent(eVent);
}//copyFrameArrays
 */
