/*****************************************************************
* PROJECT:  OBX
* File: Upload.js
* AUTHOR  : yangw
* DATE    : 2006-11-27
* MODIFY  :            DATE                      MODIFIER                           DETAILS
*
*
*
*****************************************************************/
function _UploadFile(windowid,type,argument)
{
    window.frames['__obx_iframe_file'].document.getElementById("windowid").value=windowid;
    if(type)window.frames['__obx_iframe_file'].document.getElementById("type").value=type;
    if(argument)window.frames['__obx_iframe_file'].document.getElementById("argument").value=argument;
    window.frames['__obx_iframe_file'].document.getElementById("formupload").submit();
}
function _Browser(element)
{
//************************
   // document.frames("__obx_iframe_file").document.getElementById("file").click();
    window.frames['__obx_iframe_file'].document.getElementById("file").click();
    
    if($(element))
    {
       //$(element).value=document.frames("__obx_iframe_file").document.getElementById("file").value;
       $(element).value= window.frames['__obx_iframe_file'].document.getElementById("file").value;
    }
//***************************** 
}
function _UploadFrame()
{
//    var iframe=$('__obx_iframe_file');
//    if(!iframe)
//    {
//        iframe=document.createElement("<iframe id='__obx_iframe_file' name='__obx_iframe_file' style='visible:none;display:none;height:0px;'>");
//        document.body.appendChild(iframe);
//        
//        iframe.document.body.innerHTML="<form id='formupload' method='post' enctype='multipart/form-data' action='UploadHandler.ashx' target='__obx_iframe_file'>\
//                                <input id='formuploadfile' type='file' name='file'/>\
//                                </form>";
//    }
//                            
//    return iframe;
    document.body.appendChild(document.createElement(""));
}
