function show_destination(id,image_name,destination,name){
    var targetFile = 'dgPromotionalImage.pscripts.php?id=' + encodeURIComponent( id ) + '&image_name=' + image_name + '&destination=' + destination + '&name=' + name;
    var open_file = '../../../pscripts/' + targetFile;
	
        document.getElementById( 'promotionalImage_container' ).innerHTML = "<div style=\"width:615px; height:264px; text-align:center; padding:50px 0px 0px 0px\"><img src=\"" + geturl() + "/themes/admin/default/images/ajax-loader.gif\" /></div>";
        document.getElementById( 'promotionalImage_header_container' ).innerHTML = "";

    http.open( 'get',open_file,true );
    http.onreadystatechange = handle_showDestination;
    http.send( null );
}

function show_destination2(values){
	var value = values.split(',');
    var targetFile = 'dgPromotionalImage.pscripts.php?id=' + encodeURIComponent( value[0].substr(1,(value[0].length-2)) ) + '&image_name=' + value[1].substr(1,(value[1].length-2)) + '&destination=' + value[2].substr(1,(value[2].length-2)) + '&name=' + value[3].substr(1,(value[3].length-2));
    var open_file = '../../../pscripts/' + targetFile;
    http.open( 'get',open_file,true );
    http.onreadystatechange = handle_showDestination;
    http.send( null );
}

function handle_showDestination( ){
    if( http.readyState == 1 ){
        document.getElementById( 'promotionalImage_container' ).innerHTML = "<div style=\"width:615px; height:264px; text-align:center; padding-top:50px;\"><img src=\"" + geturl() + "/themes/admin/default/images/ajax-loader.gif\" /></div>";
        document.getElementById( 'promotionalImage_header_container' ).innerHTML = "";
    }

    if( http.readyState == 4 && http.status == 200 ){  
        var response = http.responseText;    
        if( response ){
			var result = response.split('<SEPARATOR>');
            document.getElementById( 'promotionalImage_container' ).innerHTML = result[0];
	        document.getElementById( 'promotionalImage_header_container' ).innerHTML = result[1];
        }
    }
}