/* 
strap_images.js: library of javascript for validating strap images
    david.kelly@fanore.com (http://www.fanore.com/website_design.htm)
    
    
    
*/
function check_strap_image(){
    var main_image=$F('strap_image');
    var background_image=$F('background_image');
    var progress_bar_url=$F('progress_bar_url');
    if ($F('txt_title').blank()){
         show_error_message("please enter a name for this strap image!",'error_message_panel');
        $('txt_title').focus();
        return false;
    }
    if (parseInt($F('list_content'))==0){
         show_error_message("please select the page on which this strap image will be displayed!",'error_message_panel');
        $('list_content').focus();
        return false;
    }
    var el=get_el('FCKDATASOURCE');
    if (el){    
        var oEditor = FCKeditorAPI.GetInstance('txtHTML');
        var datasource_name = 'fd_description';
        //alert(datasource_name);
       $(datasource_name).value= oEditor.GetXHTML(true);  
    }       
    if ($F(datasource_name).blank()){
         show_error_message("please enter strap line text for this strap image!",'error_message_panel');
        return false;
    }    

    //return false;
    $('save').target='keyhole'; 
// display a window indicating save progress 
            var w=380;
            var h=50;
            var winLeft=Math.round((screen.width - w)/2);
            var winTop=Math.round((screen.height - h)/2);
            var sVersion = navigator.appVersion;
             
           if (sVersion.indexOf('MSIE') != -1 && sVersion.substr(sVersion.indexOf('MSIE')+5,1) > 4)
          {
        		var settings="dialogWidth:380px; dialogHeight:50px; center:yes";
        		var x=window.showModelessDialog(progress_bar_url+ '&b=IE',null,settings);
                x.opener=window
            }
            else
            {
        		//var x=window.open(progress_bar_url+ '&b=NN','','width=370,height=115', true);
                var x=window.open(progress_bar_url+ '&b=NN','','width=380px,height=50', true);
        
           }
           
            x.focus()
   
   

            

    $('save').submit();
    
}
